/* Tailwind CSS Base Styles */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: #e5e7eb;
}

::before, ::after {
  --tw-content: '';
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: 'Myriad Pro', 'Myriad', system-ui, sans-serif;
  font-feature-settings: normal;
  font-variation-settings: normal;
}

body {
  margin: 0;
  line-height: inherit;
  font-family: 'Myriad Pro', 'Myriad', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

hr {
  height: 0;
  color: inherit;
  border-top-width: 1px;
}

abbr:where([title]) {
  text-decoration: underline dotted;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
}

a {
  color: inherit;
  text-decoration: inherit;
}

b, strong {
  font-weight: bolder;
}

code, kbd, samp, pre {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
  font-feature-settings: normal;
  font-variation-settings: normal;
  font-size: 1em;
}

small {
  font-size: 80%;
}

sub, sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

table {
  text-indent: 0;
  border-color: inherit;
  border-collapse: collapse;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-size: 100%;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, input:where([type=button]), input:where([type=reset]), input:where([type=submit]) {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

:-moz-focusring {
  outline: auto;
}

:-moz-ui-invalid {
  box-shadow: none;
}

progress {
  vertical-align: baseline;
}

::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
  height: auto;
}

[type='search'] {
  -webkit-appearance: textfield;
  outline-offset: -2px;
}

::-webkit-search-decoration {
  -webkit-appearance: none;
}

::-webkit-file-upload-button {
  -webkit-appearance: button;
  font: inherit;
}

summary {
  display: list-item;
}

blockquote, dl, dd, h1, h2, h3, h4, h5, h6, hr, figure, p, pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol, ul, menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

dialog {
  padding: 0;
}

textarea {
  resize: vertical;
}

input::placeholder, textarea::placeholder {
  opacity: 1;
  color: #9ca3af;
}

button, [role="button"] {
  cursor: pointer;
}

disabled {
  cursor: default;
}

img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  vertical-align: middle;
}

img, video {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none;
}

/* Custom IFYS Colors */
:root {
  --ifys-blue: #0F3656;
  --ifys-light-blue: #60a5fa;
  --ifys-dark-blue: #0F3656;
  --ifys-gray: #6b7280;
  --ifys-light-gray: #EDEDED;
  --ifys-perk-light: #A0B8CB;
}

/* Utility Classes */
.min-h-screen { min-height: 100vh; }
.bg-white { background-color: #ffffff; }
.bg-ifys-blue { background-color: var(--ifys-blue); }
.bg-ifys-light-gray { background-color: var(--ifys-light-gray); }
.bg-ifys-perk-light { background-color: var(--ifys-perk-light); }

.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }

.w-full { width: 100%; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-72 { width: 18rem; }
.w-96 { width: 24rem; }
.w-auto { width: auto; }

.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-64 { height: 16rem; }
.h-80 { height: 20rem; }
.h-96 { height: 24rem; }
.h-full { height: 100%; }

.px-0 { padding-left: 0px; padding-right: 0px; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }

.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.-top-32 { top: -8rem; }
.-bottom-32 { bottom: -8rem; }
.-left-32 { left: -8rem; }
.-right-32 { right: -8rem; }
.top-4 { top: 1rem; }
.top-8 { top: 2rem; }
.right-4 { right: 1rem; }
.right-8 { right: 2rem; }
.left-8 { left: 2rem; }

.flex { display: flex; }
.hidden { display: none; }
.grid { display: grid; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0px; right: 0px; bottom: 0px; left: 0px; }

.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.flex-1 { flex: 1 1 0%; }
.flex-col { flex-direction: column; }

.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.space-x-6 > :not([hidden]) ~ :not([hidden]) { margin-left: 1.5rem; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.text-8xl { font-size: 6rem; line-height: 1; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-light { font-weight: 300; }

.text-white { color: #ffffff; }
.text-ifys-blue { color: var(--ifys-blue); }
.text-ifys-gray { color: var(--ifys-gray); }
.text-gray-600 { color: #4b5563; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide { letter-spacing: 0.025em; }

.border-b { border-bottom-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-gray-100 { border-color: #f3f4f6; }
.border-ifys-blue { border-color: var(--ifys-blue); }

.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-t-lg { border-top-left-radius: 0.5rem; border-top-right-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

.overflow-hidden { overflow: hidden; }

.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }
.object-center { object-position: center; }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

.hover\:text-ifys-blue:hover { color: var(--ifys-blue); }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-color); }
.focus\:ring-white\/70:focus { --tw-ring-color: rgb(255 255 255 / 0.7); }
.focus\:text-ifys-blue:focus { color: var(--ifys-blue); }

.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }

.opacity-30 { opacity: 0.3; }
.opacity-100 { opacity: 1; }

.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }

.mx-auto { margin-left: auto; margin-right: auto; }

.h-12 { height: 3rem; }

/* Grid System */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Responsive Design */
@media (min-width: 640px) {
  .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
  .md\:block { display: block; }
  .md\:hidden { display: none; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:flex-row { flex-direction: row; }
  .md\:text-right { text-align: right; }
  .md\:mb-0 { margin-bottom: 0px; }
  .md\:h-\[300px\] { height: 300px; }
}

@media (min-width: 1024px) {
  .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:col-span-1 { grid-column: span 1 / span 1; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:justify-start { justify-content: flex-start; }
}

/* Button Styles */
.btn {
  font-weight: 500;
  border-radius: 0;
  transition: all 0.3s ease;
  outline: none;
  transform: scale(1);
  cursor: pointer;
}

.btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px var(--ifys-blue);
}

.btn:hover {
  transform: scale(1.05);
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background-color: var(--ifys-blue);
  color: white;
  border: none;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.btn-primary:hover {
  background-color: var(--ifys-dark-blue);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.btn-sm {
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

/* Custom smaller button for back button */
.btn-back {
  padding: 10px;
  font-size: 0.8rem;
  height: auto;
  min-height: 2rem;
}

/* Custom Styles for Hero Section */
.h-\[250px\] { height: 250px; }

@media (min-width: 768px) {
  .md\:h-\[300px\] { height: 300px; }
}

/* Text color utilities */
.text-white\/90 { color: rgb(255 255 255 / 0.9); }

/* Focus ring utilities */
.focus\:ring-offset-2:focus { box-shadow: 0 0 0 2px var(--tw-ring-offset-color), 0 0 0 4px var(--tw-ring-color); }

/* Additional utility classes */
.flex-1 { flex: 1 1 0%; }
.h-full { height: 100%; }
.w-full { width: 100%; }
.object-center { object-position: center; }

/* Mobile menu styles */
.mobile-menu {
  display: none;
}

.mobile-menu.active {
  display: block;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .transition-all,
  .transition-shadow,
  .hover\:scale-105:hover,
  .hover\:-translate-y-1:hover {
    transition: none;
    transform: none;
  }
}

/* Mobile-specific fixes */
@media (max-width: 767px) {
  /* Ensure proper spacing on mobile */
  main {
    margin-bottom: 5rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Fix footer spacing */
  footer {
    margin-top: 5rem !important;
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
  }
  
  /* Ensure iframe doesn't overlap footer */
  iframe {
    margin-bottom: 4rem !important;
  }
  
  /* Better mobile hero section */
  .hero-mobile {
    background: var(--ifys-blue);
    height: 200px;
  }
  
  /* Reduce section padding on mobile */
  section {
    padding-bottom: 0.5rem !important;
    margin-bottom: 2rem !important;
  }
  
  /* Force main content to not overlap */
  .main-content {
    margin-bottom: 6rem !important;
    padding-bottom: 4rem !important;
  }
}

/* Footer spacer */
.footer-spacer {
  height: 2rem;
}

@media (max-width: 767px) {
  .footer-spacer {
    height: 4rem;
  }
}

/* Ensure footer is always visible */
footer {
  clear: both;
  position: relative;
  z-index: 10;
}

/* Main content spacing */
.main-content {
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .main-content {
    margin-bottom: 3rem;
  }
}

/* Dropdown Menu Styles - Simple Table Style */
.dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1000;
  display: none;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  color: #374151;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #f8fafc;
  color: #1e3a8a;
}

/* Mobile dropdown adjustments */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: #f8fafc;
    margin-top: 4px;
  }
  
  .dropdown-item {
    padding: 6px 12px;
    font-size: 13px;
  }
}

/* Footer specific styles */
footer {
  position: relative;
  overflow: hidden;
}

footer .grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 6rem;
}

@media (min-width: 1024px) {
  footer .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

footer .space-y-4 > * + * {
  margin-top: 1rem;
}

footer .space-x-4 > * + * {
  margin-left: 1rem;
}

footer .flex-nowrap {
  flex-wrap: nowrap;
}

footer .whitespace-nowrap {
  white-space: nowrap;
}

footer .leading-relaxed {
  line-height: 1.625;
}

footer .font-semibold {
  font-weight: 600;
}

footer .hover\:underline:hover {
  text-decoration: underline;
}

footer .hover\:text-gray-300:hover {
  color: #d1d5db;
}

footer .w-\[28rem\] {
  width: 28rem;
}

footer .h-\[28rem\] {
  height: 28rem;
}

footer .-mr-72 {
  margin-right: -18rem;
}

footer .-top-24 {
  top: -6rem;
}

footer .-bottom-8 {
  bottom: -2rem;
}

footer .-ml-24 {
  margin-left: -6rem;
}

footer .-ml-8 {
  margin-left: -2rem;
}

footer .mt-1 {
  margin-top: 0.25rem;
}

footer .mt-2 {
  margin-top: 0.5rem;
}

footer .mt-4 {
  margin-top: 1rem;
}

footer .mb-0 {
  margin-bottom: 0;
}

footer .mb-4 {
  margin-bottom: 1rem;
}

footer .gap-1 {
  gap: 0.25rem;
}

footer .gap-24 {
  gap: 6rem;
}

footer .py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* Mobile and tablet-friendly footer styles - up to 1430px */
@media (max-width: 1430px) {
  /* Hide the Aboriginal artwork image on mobile and tablet */
  footer .rounded-full {
    display: none !important;
  }
  
  /* Hide the entire right column on mobile and tablet */
  footer .grid > div:last-child {
    display: none !important;
  }
  
  /* Adjust footer layout for mobile and tablet */
  footer .grid {
    gap: 2rem !important;
  }
  
  footer .-ml-24 {
    margin-left: 0 !important;
  }
  
  footer .-ml-8 {
    margin-left: 0 !important;
  }
  
  /* Improve text readability on mobile and tablet */
  footer .text-sm {
    font-size: 0.8125rem;
  }
  
  /* Stack footer columns properly on mobile and tablet */
  footer .lg\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  /* Adjust padding for mobile and tablet */
  footer .py-8 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* Three-column layout with image only for screens 1430px and above */
@media (min-width: 1431px) {
  footer .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

footer .px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

footer .px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

footer .px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

footer .text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

footer .text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

footer .rounded-full {
  border-radius: 9999px;
}

footer .overflow-hidden {
  overflow: hidden;
}

footer .object-cover {
  object-fit: cover;
}

footer .w-full {
  width: 100%;
}

footer .h-full {
  height: 100%;
}

footer .justify-center {
  justify-content: center;
}

footer .justify-end {
  justify-content: flex-end;
}

footer .flex {
  display: flex;
}

footer .items-center {
  align-items: center;
}

footer .max-w-7xl {
  max-width: 80rem;
}

footer .mx-auto {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 640px) {
  footer .sm\:px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  footer .lg\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  
  footer .lg\:justify-end {
    justify-content: flex-end;
  }
  
  footer .lg\:px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Iframe content styling - more aggressive overrides */
iframe {
  background: white !important;
}

/* Override iframe body background with higher specificity */
iframe body,
body iframe body,
iframe body[style*="background"] {
  background: white !important;
  background-color: white !important;
  background-image: none !important;
}

/* Override any background patterns */
iframe * {
  background-color: white !important;
  background-image: none !important;
}

/* Force white background on iframe content */
iframe html,
iframe html body {
  background: white !important;
  background-color: white !important;
  background-image: none !important;
}

/* Iframe loading and error states */
#iframe-loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

#iframe-error {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#iframe-error h3 {
  color: var(--ifys-blue);
  margin-bottom: 15px;
  font-size: 1.25rem;
  font-weight: 600;
}

#iframe-error p {
  color: #6c757d;
  margin-bottom: 15px;
  line-height: 1.5;
}

#iframe-error .btn {
  margin-top: 10px;
}
