/* Mobile and tablet responsive styles */

/* Tablet styles (768px and below) */
@media screen and (max-width: 768px) {
  :root {
    --h1-size: 1.3em;
    --h2-size: 1.3em;
    --h3-size: 1.1em;
    --subtitle-size: 0.9em;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  /* Header adjustments for tablet */
  .header-content {
    flex-wrap: wrap;
  }

  .logo-title-wrapper {
    flex: 1;
    min-width: 0; /* Allow text to wrap */
  }

  .title-group {
    margin-left: var(--spacing-sm);
  }

  .site-title {
    font-size: var(--h1-size);
    line-height: 1.2;
  }

  .site-subtitle {
    font-size: var(--subtitle-size);
  }

  /* Navigation adjustments */
  nav ul li {
    margin-left: var(--spacing-md);
  }

  nav ul li a {
    padding: var(--spacing-xs);
    font-size: 0.9em;
  }

  /* Content sections */
  .animal-list {
    gap: var(--spacing-md);
  }

  .animal-row {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .animal-row-second::before {
    display: none;
  }

  .animal-row-second .animal-card:first-child,
  .animal-row-second .animal-card:last-child {
    margin: 0;
  }

  .classes-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .map-container {
    order: -1;
    /* Show map first on mobile */
  }

  .map-frame {
    height: 250px;
    /* Slightly smaller on mobile */
  }
  .classes-grid-large-map {
    grid-template-columns: 1fr; /* Stack vertically on mobile */
    gap: var(--spacing-lg);
  }
  
  .map-container {
    order: -1; /* Show map first on mobile */
  }
  
  .map-frame-large {
    height: 400px; /* Larger than original mobile size */
  }

  .footer-content {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  .footer-contact, .footer-social {
    justify-content: center;
  }

  .back-to-top-icon {
    width: 15px;
    height: 15px;
  }

  .title-link {
    gap: 0.4rem;
  }

  .schedule-list li {
    padding: var(--spacing-sm) 0;
    gap: 0.3rem;
  }

  .schedule-list strong {
    font-size: 1.05em;
  }

  .schedule-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .schedule-list li {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
  }

  .schedule-list li:last-child {
    border-bottom: none;
  }

  .schedule-list strong {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.05em;
  }

  .schedule-list .location {
    font-size: 0.9em;
    color: var(--light-text);
    opacity: 0.8;
  }
}

/* Mobile styles (480px and below) */
@media screen and (max-width: 480px) {
  :root {
    --h1-size: 1.1em;
    --h2-size: 1.2em;
    --h3-size: 1.1em;
    --subtitle-size: 0.75em;
    --spacing-lg: 0.75rem;
    --spacing-xl: 1rem;
  }

  .container {
    padding: 0 var(--spacing-xs);
  }

  /* Mobile header - hamburger on top row, logo/title on second row */
  .header-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--spacing-xs);
  }

  .logo-title-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    gap: var(--spacing-sm);
    order: 2;
  }

  /* Move navigation to top */
  nav {
    order: 1;
    align-self: flex-end;
    position: relative;
    flex-shrink: 0;
  }

  .logo-social-group {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    flex-shrink: 0;
  }

  .title-group {
    margin-left: var(--spacing-xs);
    flex: 1;
  }

  .site-title {
    font-size: var(--h1-size);
    line-height: 1.1;
    margin: 0;
    /* Remove text truncation since we now have full width */
  }

  .site-subtitle {
    font-size: var(--subtitle-size);
    line-height: 1.1;
    margin: 0;
    /* Remove text truncation since we now have full width */
  }

  /* Mobile sticky header adjustments */
  header.sticky {
    padding: var(--spacing-xs) 0;
  }

  header.sticky .site-title {
    font-size: 1em;
  }

  header.sticky .site-subtitle {
    display: none; /* Hide subtitle when sticky to save space */
  }

  /* Mobile navigation - hamburger on top right */
  nav {
    order: 1;
    align-self: flex-end;
    position: relative;
    flex-shrink: 0;
  }

  .nav-toggle {
    display: block;
    padding: var(--spacing-xs);
    font-size: 1.2rem;
    min-width: 40px;
    height: 40px;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100vw;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-sm);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
  }

  nav ul.show {
    display: flex;
  }

  nav ul li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  nav ul li a {
    display: block;
    padding: var(--spacing-md);
    text-align: center;
    border-bottom: none;
    border-radius: 0;
    font-size: 1rem;
  }

  nav ul li a:hover, nav ul li a:focus {
    background-color: rgba(255, 255, 255, 0.1);
  }

  /* Content adjustments */
  section {
    padding: var(--spacing-lg) 0;
  }

  h2 {
    font-size: var(--h2-size);
    margin-bottom: var(--spacing-md);
  }

  h3 {
    font-size: var(--h3-size);
    margin-top: var(--spacing-md);
  }

  /* Hero section mobile - Carousel */
  .slide img {
    height: 300px;
    object-fit: contain;
    object-position: center;
    background-color: var(--dark-gray);
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    line-height: 1;
    font-family: monospace;
  }

  .carousel-btn.prev {
    left: var(--spacing-sm);
  }

  .carousel-btn.next {
    right: var(--spacing-sm);
  }

  .slide-caption {
    padding: var(--spacing-lg) var(--spacing-sm) var(--spacing-sm);
  }

  .slide-caption h3 {
    font-size: 1.1rem;
  }

  .carousel-dots {
    padding: var(--spacing-md);
  }

  /* Animals grid mobile */
  .animal-list {
    gap: var(--spacing-md);
  }

  .animal-row {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .animal-row-second::before {
    display: none;
  }

  .animal-row-second .animal-card:first-child,
  .animal-row-second .animal-card:last-child {
    margin: 0;
  }

  .animal-card {
    width: 100%;
    max-width: 320px;
  }

  /* Class schedule mobile */
  .classes-content {
    max-width: 100%;
  }

  .schedule-list li {
    padding: var(--spacing-md) 0;
    gap: 0.5rem;
  }

  .schedule-list strong {
    font-size: 1.1em;
  }

  .schedule-list .location {
    font-size: 0.85em;
  }

  .location-details {
    padding: var(--spacing-md);
  }

  .map-frame {
    height: 200px;
  }
  
  .map-frame-large {
    height: 350px; /* Still larger than original */
  }

  .directions-link {
    display: block;
    text-align: center;
    width: 100%;
  }

  /* Contact form mobile */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .contact-form-container {
    order: -1; /* Show form first on mobile */
    padding: var(--spacing-lg);
  }

  .contact-form {
    gap: var(--spacing-md);
  }

  .form-group input,
  .form-group textarea {
    padding: var(--spacing-sm);
    font-size: 0.95rem;
  }

  .submit-btn {
    width: 100%;
    align-self: stretch;
    font-size: 1rem;
  }

  /* FAQ mobile */
  details summary {
    padding: var(--spacing-sm);
    font-size: 0.9em;
  }

  details p {
    padding: 0 var(--spacing-sm) var(--spacing-sm);
    font-size: 0.9em;
  }

  /* Downloads mobile */
  .resource-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-xs);
  }

  .file-type {
    align-self: flex-end;
  }

  /* Footer mobile */
  .footer-content {
    text-align: center;
  }

  .footer-info p {
    font-size: 0.9em;
    margin-bottom: var(--spacing-sm);
  }

  .back-to-top-icon {
    width: 14px;
    height: 14px;
  }

  .title-link {
    gap: 0.3rem;
  }

  /* Contact form mobile styles */
  .contact-content {
    max-width: 100%;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .contact-form-container {
    order: -1; /* Show form first on mobile */
    padding: var(--spacing-md);
  }

  .contact-info {
    padding: var(--spacing-md);
  }

  .contact-item {
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
  }

  .form-group {
    gap: var(--spacing-xs);
  }

  .form-group input,
  .form-group textarea {
    padding: var(--spacing-sm);
    font-size: 0.9rem;
  }

  .form-group textarea {
    min-height: 100px;
  }

  .submit-btn {
    width: 100%;
    align-self: stretch;
    font-size: 0.95rem;
    padding: var(--spacing-sm) var(--spacing-md);
  }

  .form-note {
    font-size: 0.8em;
    text-align: center;
  }

  /* Success and Error Messages - Mobile */
  .form-success-message,
  .form-error-message {
    min-height: 300px;
    padding: var(--spacing-md);
  }

  .success-content,
  .error-content {
    padding: var(--spacing-lg);
  }

  .success-icon {
    width: 60px;
    height: 60px;
    font-size: 2.5rem;
  }

  .error-icon {
    font-size: 3rem;
  }

  .success-content h3,
  .error-content h3 {
    font-size: 1.3rem;
  }

  .success-content p,
  .error-content p {
    font-size: 0.9rem;
  }

  .success-note,
  .error-note {
    padding: var(--spacing-sm);
    font-size: 0.85rem;
  }

  .send-another-btn,
  .try-again-btn {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.95rem;
  }
}

/* Print styles */
@media print {
  header {
    position: static !important;
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  .nav-toggle {
    display: none !important;
  }

  nav ul {
    display: flex !important;
    flex-direction: row !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .skip-link {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  section {
    border-bottom: 1px solid #ccc;
    background: white !important;
  }

  .animal-card, .class-schedule, .lineage, .what-to-bring, .class-pricing {
    background: white !important;
    border: 1px solid #ccc !important;
  }

  details {
    background: white !important;
    border: 1px solid #ccc !important;
  }

  a {
    color: black !important;
    text-decoration: underline !important;
  }

  .facebook-link, .facebook-icon {
    display: none;
  }
}
