/* ==========================================================================
   Brand Storytelling Template - Responsive CSS
   ========================================================================== */

/* Mobile First Approach - Base styles for mobile devices */

/* Typography Adjustments */
@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    /* Disable animations on mobile for better performance */
    .hero-blob {
        animation: none;
    }
    
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    #gallery img:hover {
        transform: none;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .display-4 {
        font-size: 2.25rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    /* Navbar adjustments */
    .navbar-brand {
        font-size: 1.75rem;
    }
    
    /* Hero section adjustments */
    .hero-blob {
        width: 400px;
        height: 400px;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 220px;
    }
    
    /* Process section - show more items per row */
    #process .col-lg-4.col-xl-2 {
        flex: 0 0 auto;
        width: 20%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .display-4 {
        font-size: 3rem;
    }
    
    /* Hero section full height */
    #hero {
        min-height: 100vh;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 240px;
    }
    
    /* Team section - center odd number of items */
    #team .col-xl-4:last-child:nth-child(odd) {
        margin: 0 auto;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    /* Hero blob larger on XL screens */
    .hero-blob {
        width: 500px;
        height: 500px;
    }
    
    /* Services cards in a perfect grid */
    #services .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Specific section responsive adjustments */

/* Navigation */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: var(--shadow-md);
        margin-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--neutral-light);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Hero Section */
@media (max-width: 768px) {
    #hero {
        padding-top: 6rem;
        min-height: auto;
    }
    
    #hero .col-lg-6:last-child {
        margin-top: 2rem;
    }
    
    .hero-blob {
        display: none; /* Hide decorative blob on mobile */
    }
}

/* About Section Features */
@media (max-width: 768px) {
    #about .col-lg-3 {
        margin-bottom: 2rem;
    }
}

/* Services Section */
@media (max-width: 768px) {
    #services .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    overflow-x: hidden;
}
}

/* Features Section */
@media (max-width: 768px) {
    #features .d-flex {
        text-align: center;
        flex-direction: column;
    }
    
    #features .flex-shrink-0 {
        margin-bottom: 1rem;
        flex-shrink: 1;
    }
    
    #features .flex-grow-1 {
        margin-left: 0 !important;
    }
}

/* Price Plans */
@media (max-width: 992px) {
    #priceplan .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Team Section */
@media (max-width: 576px) {
    #team img {
        width: 120px;
        height: 120px;
    }
    
    #team .col-lg-6.col-xl-4 {
        margin-bottom: 2rem;
    }
}

/* Reviews Section */
@media (max-width: 992px) {
    #reviews .col-lg-4 {
        margin-bottom: 1.5rem;
    }
}

/* Case Studies */
@media (max-width: 992px) {
    #casestudy .col-lg-4 {
        margin-bottom: 2rem;
    }
}

/* Process Section */
@media (max-width: 768px) {
    #process .col-lg-4.col-xl-2 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    #process .rounded-circle {
        width: 50px !important;
        height: 50px !important;
    }
    
    #process .rounded-circle .fs-4 {
        font-size: 1.25rem !important;
    }
}

/* Gallery */
@media (max-width: 768px) {
    #gallery .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* FAQ Section */
@media (max-width: 992px) {
    #faq .col-lg-6 {
        margin-bottom: 1.5rem;
    }
}

/* Contact Section */
@media (max-width: 992px) {
    #contact .col-lg-8 {
        margin-bottom: 2rem;
    }
}

/* Footer */
@media (max-width: 768px) {
    footer .col-lg-4 {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    footer .row.align-items-center .col-md-6 {
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Additional Pages Responsive */
@media (max-width: 768px) {
    /* Section 1 - Additional Page 1 */
    .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Section 2 - Features with icons */
    .d-flex .flex-shrink-0 {
        margin-bottom: 1rem;
    }
    
    .d-flex {
        text-align: center;
        flex-direction: column;
    }
    
    .flex-grow-1 {
        margin-left: 0 !important;
    }
    
    /* Section 3 - Tools grid */
    .col-lg-3.col-md-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Section 4 - Brand measurement cards */
    .col-lg-6 {
        margin-bottom: 1.5rem;
    }
    
    /* Section 5 - Implementation support */
    .col-md-4 {
        margin-bottom: 2rem;
    }
    
    .rounded-circle {
        width: 60px !important;
        height: 60px !important;
        margin-bottom: 1rem !important;
    }
}

/* Additional Page 2 Responsive */
@media (max-width: 768px) {
    /* Creative storytelling cards */
    .card.border-0.shadow {
        margin-bottom: 1.5rem;
    }
    
    /* Digital innovation section */
    #add_page_2_sec_2_title + * .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    /* Multi-platform campaigns */
    .col-lg-6.col-xl-4 {
        margin-bottom: 1.5rem;
    }
    
    /* Performance optimization */
    .col-md-6.col-lg-3 {
        margin-bottom: 1.5rem;
    }
    
    .bg-gradient.rounded-3 {
        width: 60px !important;
        height: 60px !important;
        padding: 1rem !important;
    }
    
    /* Future-ready solutions */
    .card.shadow-lg {
        margin-bottom: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    #gallery,
    footer {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card-img-top,
    #team img,
    #gallery img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero-blob {
        animation: none !important;
    }
    
    .fade-in {
        transition: none !important;
    }
    
    .card:hover,
    .btn:hover,
    #gallery img:hover {
        transform: none !important;
    }
}

/* Dark Mode Support (Future Enhancement) */