/* =============================================
   PH Silver Bay - Responsive Styles
   ============================================= */

/* ===========================================
   Tablet (max-width: 1024px)
   =========================================== */

@media (max-width: 1024px) {
  :root {
    --fs-h1: 48px;
    --fs-h2: 40px;
    --lh-h1: 56px;
  }

  /* Reasons Grid */
  .reasons-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Investment Grid */
  .investment-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Amenities Grid */
  .amenities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Colombianos Grid */
  .colombianos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Beneficios Grid */
  .beneficios-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Panama Grid */
  .panama-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Location */
  .location-content {
    gap: var(--spacing-xl);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
  }
}

/* ===========================================
   Tablet (max-width: 768px)
   =========================================== */

@media (max-width: 768px) {
  :root {
    --fs-h1: 40px;
    --fs-h2: 32px;
    --fs-h3: 20px;
    --lh-h1: 48px;
    --section-padding: 60px 0;
  }

  /* ===========================================
     Navigation Mobile
     =========================================== */

  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--bg-cream);
    flex-direction: column;
    padding: var(--spacing-lg);
    gap: 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
  }

  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-menu li {
    border-bottom: 1px solid rgba(var(--primary-dark-rgb), 0.1);
  }

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

  .nav-link {
    display: block;
    padding: var(--spacing-md) 0;
    font-size: var(--fs-body);
  }

  .nav-link::after {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Hide some nav actions on mobile */
  .nav-actions .social-links {
    display: none;
  }

  /* ===========================================
     Hero Section
     =========================================== */

  .hero {
    min-height: 100vh;
    background-attachment: scroll;
  }

  .hero-logo {
    max-width: 280px;
  }

  .hero-content {
    padding: 0 var(--spacing-md);
  }

  .hero-title {
    font-size: var(--fs-h1);
  }

  .hero-subtitle {
    font-size: 18px;
    margin-bottom: var(--spacing-lg);
  }

  .hero-description {
    font-size: 14px;
  }

  .hero-content .btn-primary {
    padding: 16px 32px;
    font-size: 16px;
    margin-top: var(--spacing-xl);
  }

  /* ===========================================
     Investment Section
     =========================================== */

  .investment-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ===========================================
     Features List
     =========================================== */

  .features-list {
    flex-direction: column;
    align-items: center;
  }

  /* ===========================================
     Colombianos Section
     =========================================== */

  .colombianos-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ===========================================
     Beneficios Section
     =========================================== */

  .beneficios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ===========================================
     Panama Section
     =========================================== */

  .panama-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ===========================================
     Reasons Section
     =========================================== */

  .reasons-section h1 {
    font-size: var(--fs-h1);
  }

  .reasons-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
  }

  .reason-card {
    padding: var(--spacing-md);
  }

  .reason-card h3 {
    font-size: 16px;
  }

  .platforms-box {
    padding: var(--spacing-lg);
  }

  .platform-logos {
    flex-direction: column;
    gap: var(--spacing-md);
  }

  /* ===========================================
     Apartments Section
     =========================================== */

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ===========================================
     Amenities Section
     =========================================== */

  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .carousel-slide img {
    height: 350px;
  }

  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .carousel-btn.prev {
    left: 10px;
  }

  .carousel-btn.next {
    right: 10px;
  }

  /* ===========================================
     Location Section
     =========================================== */

  .location-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }

  .location-map {
    height: 300px;
  }

  .location-info {
    text-align: center;
  }

  .location-list {
    display: inline-block;
    text-align: left;
  }

  /* ===========================================
     Contact Section
     =========================================== */

  .form-row {
    grid-template-columns: 1fr;
  }

  /* ===========================================
     Footer
     =========================================== */

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-xl);
  }

  .footer-brand .footer-logo {
    margin: 0 auto var(--spacing-md);
  }

  .footer-social-links {
    justify-content: center;
  }

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

  /* ===========================================
     Modal
     =========================================== */

  .modal-nav.prev {
    left: 10px;
  }

  .modal-nav.next {
    right: 10px;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  /* Models Modal */
  .model-card {
    grid-template-columns: 1fr;
  }

  /* ===========================================
     WhatsApp Button
     =========================================== */

  .whatsapp-float {
    width: 55px;
    height: 55px;
    font-size: 24px;
    bottom: 15px;
    right: 15px;
  }
}

/* ===========================================
   Mobile Small (max-width: 640px)
   =========================================== */

@media (max-width: 640px) {
  :root {
    --fs-h1: 32px;
    --fs-h2: 28px;
    --fs-h3: 18px;
    --lh-h1: 40px;
    --container-padding: 15px;
  }

  /* Typography */
  h1 {
    font-size: var(--fs-h1);
    line-height: var(--lh-h1);
  }

  h2 {
    font-size: var(--fs-h2);
  }

  /* Buttons */
  .btn-primary {
    padding: 14px 24px;
    font-size: var(--fs-small);
  }

  /* ===========================================
     Hero Section
     =========================================== */

  .hero-logo {
    max-width: 220px;
  }

  /* ===========================================
     Reasons Section
     =========================================== */

  .reasons-section .subtitle {
    font-size: var(--fs-body);
  }

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

  .reason-card {
    padding: var(--spacing-sm);
  }

  .reason-card .icon {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .reason-card h3 {
    font-size: 14px;
  }

  .reason-card p {
    font-size: var(--fs-xs);
  }

  /* ===========================================
     Apartments Section
     =========================================== */

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

  .gallery-item {
    aspect-ratio: 1/1;
  }

  /* ===========================================
     Amenities Section
     =========================================== */

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

  .amenity-item {
    padding: var(--spacing-md);
  }

  .amenity-item h3 {
    font-size: 14px;
  }

  .amenity-item p {
    font-size: var(--fs-xs);
  }

  .carousel-slide img {
    height: 250px;
  }

  /* ===========================================
     Location Section
     =========================================== */

  .location-info p {
    font-size: var(--fs-body);
  }

  .location-map {
    height: 250px;
  }

  /* ===========================================
     Contact Section
     =========================================== */

  .contact-form .btn-primary {
    font-size: var(--fs-body);
  }

  /* ===========================================
     Footer
     =========================================== */

  .footer {
    padding: var(--spacing-2xl) 0 var(--spacing-md);
  }

  .footer-brand .footer-logo {
    max-width: 120px;
  }

  /* ===========================================
     Section Headers
     =========================================== */

  .section-header {
    margin-bottom: var(--spacing-xl);
  }

  .section-subtitle {
    font-size: var(--fs-small);
  }
}

/* ===========================================
   Very Small Screens (max-width: 380px)
   =========================================== */

@media (max-width: 380px) {
  :root {
    --fs-h1: 28px;
    --fs-h2: 24px;
    --lh-h1: 36px;
  }

  .hero-logo {
    max-width: 180px;
  }

  .hero-title {
    font-size: 24px;
  }

  .hero-subtitle {
    font-size: 14px;
  }

  .hero-description {
    font-size: 12px;
  }

  .reasons-grid {
    grid-template-columns: 1fr;
  }

  .investment-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .amenities-grid {
    grid-template-columns: 1fr;
  }

  .colombianos-grid {
    grid-template-columns: 1fr;
  }

  .beneficios-grid {
    grid-template-columns: 1fr;
  }

  .panama-grid {
    grid-template-columns: 1fr;
  }

  .platform-logos {
    flex-direction: column;
  }
}

/* ===========================================
   Landscape Orientation on Mobile
   =========================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 100px 0 60px;
  }

  .hero-logo {
    max-width: 200px;
  }
}

/* ===========================================
   High Resolution Displays
   =========================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Use higher resolution images if available */
}

/* ===========================================
   Print Styles
   =========================================== */

@media print {
  .navbar,
  .whatsapp-float,
  .carousel-btn,
  .mobile-menu-toggle {
    display: none !important;
  }

  .hero {
    min-height: auto;
    padding: 40px 0;
  }

  section {
    padding: 30px 0;
    page-break-inside: avoid;
  }

  a {
    text-decoration: underline;
  }
}
