/* ===================================
   PharmaCore - Responsive Styles
   responsive.css  (fully rebuilt)
   =================================== */

/* ---- Large Desktops: 1400px+ ---- */
@media (min-width: 1400px) {
    .container {
        max-width: 1340px;
    }
}

/* ---- Medium Desktops: max 1200px ---- */
@media (max-width: 1200px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 36px;
    }

    .footer-grid .footer-col:last-child {
        grid-column: 1 / -1;
    }

    .about-grid {
        gap: 50px;
    }

    .contact-grid {
        gap: 40px;
    }
}

/* ---- Tablets / Small Desktops: max 1024px ---- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image-wrap img {
        height: 360px;
    }

    .about-badge-float {
        left: 0;
    }

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

    .research-intro {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .research-intro img {
        max-height: 360px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }

    /* Top bar hidden on tablets */
    .top-bar-left span:last-child {
        display: none;
    }

    /* Nav links slightly smaller */
    .main-nav a {
        font-size: 0.85rem;
        padding: 7px 10px;
    }

    /* ---- PRODUCT DETAILS ---- */
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .product-visual-sticky {
        position: static;
        margin-bottom: 0;
    }
}

/* ---- Tablets Portrait: max 768px ---- */
@media (max-width: 768px) {

    /* ---- TOP BAR ---- */
    .top-bar {
        display: none;
        /* hide on mobile for clean look */
    }

    /* ---- HEADER / NAV ---- */
    .main-header {
        padding: 12px 0;
    }

    .nav-wrapper {
        gap: 12px;
    }

    /* Slide-in mobile nav */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100dvh;
        background: #fff;
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
        padding: 90px 28px 40px;
        z-index: 999;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }

    .main-nav.open {
        right: 0;
    }

    /* Overlay backdrop */
    .main-nav.open::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: -1;
        right: min(320px, 85vw);
    }

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .main-nav a {
        padding: 13px 14px;
        font-size: 1rem;
        border-radius: 10px;
        display: block;
    }

    .main-nav a.active {
        background: var(--bg-light);
        color: var(--primary);
    }

    .hamburger {
        display: flex;
        z-index: 1000;
    }

    .btn-nav {
        display: none;
    }

    /* ---- HERO ---- */
    .hero {
        min-height: 85vh;
        padding: 80px 0 60px;
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-stats {
        justify-content: center;
        gap: 24px;
    }

    .hero-stat .number {
        font-size: 1.6rem;
    }

    .hero-scroll {
        display: none;
    }

    /* ---- SECTIONS ---- */
    .about-section,
    .services-section,
    .products-preview,
    .stats-section,
    .testimonials-section,
    .cta-section,
    .products-page,
    .contact-page,
    .research-page,
    .about-page,
    .services-page {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    /* ---- ABOUT ---- */
    .about-text-col .section-header {
        text-align: center;
    }

    .about-text-col .divider {
        margin: 16px auto 0;
    }

    /* ---- STATS ---- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-card {
        padding: 28px 16px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    /* ---- SERVICES grid ---- */
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* ---- PRODUCTS GRID ---- */
    .products-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    .products-cards {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }

    /* ---- TESTIMONIALS ---- */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    /* ---- MISSION/VISION ---- */
    .mission-vision {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ---- TEAM ---- */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    /* ---- FOOTER ---- */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-newsletter {
        flex-direction: column;
        /* text-align: center; */
        padding: 24px 20px;
    }

    .newsletter-form {
        width: 100%;
        max-width: 100%;
        /* justify-content: center; */
    }

    .footer-bottom {
        flex-direction: column;
        /* text-align: center; */
        gap: 12px;
    }

    .footer-bottom-links {
        flex-wrap: wrap;
        /* justify-content: center; */
        gap: 12px;
    }

    /* ---- FORMS ---- */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form {
        padding: 28px 22px;
    }

    .contact-grid {
        gap: 32px;
    }

    /* ---- PAGE BANNER ---- */
    .page-banner {
        padding: 60px 0 90px;
    }

    /* ---- PIPELINE ---- */
    .pipeline-item {
        flex-wrap: wrap;
        gap: 14px;
    }

    .pipeline-phase {
        min-width: 90px;
    }

    .pipeline-status {
        min-width: auto;
        text-align: left;
    }

    /* ---- SERVICES FULL PAGE ---- */
    .services-features {
        grid-template-columns: 1fr 1fr;
    }

    /* ---- RESEARCH INTRO ---- */
    .research-intro {
        gap: 32px;
        margin-bottom: 48px;
    }

    /* ---- CTA ---- */
    .cta-btns {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    /* ---- PRODUCT DETAILS ---- */
    .product-details-container {
        padding: 24px 16px;
    }

    .brochure-content {
        padding: 20px 0;
    }

    .product-spec-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 15px 0;
    }

    .product-details-actions {
        grid-template-columns: 1fr;
    }
}

/* ---- Mobile: max 600px ---- */
@media (max-width: 600px) {
    .hero {
        min-height: 90vh;
        padding: 100px 0 60px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 14px;
        align-items: center;
    }

    /* Nav links bigger tap targets */
    .main-nav a {
        padding: 15px 14px;
        font-size: 1.05rem;
    }

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

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

    .products-cards {
        grid-template-columns: 1fr;
    }

    .services-features {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 24px 12px;
    }

    .stat-number {
        font-size: 2rem;
    }

    @media (max-width: 768px) {
    .stagger-children{
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

@media (max-width: 576px) {
    .stagger-children{
        grid-template-columns: 1fr !important;
    }

    .stagger-children > div{
        padding: 20px !important;
    }
}

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

    /* .footer-col {
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    } */

    .footer-col h4::after {
        left: 5%;
        transform: translateX(-50%);
    }

    /* .footer-col ul a {
        justify-content: center;
    }

    .contact-list li {
        justify-content: center;
    } */

    .about-badge-float {
        position: static;
        margin-top: 16px;
        border-radius: var(--radius-md);
    }

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

    .cta-btns {
        flex-direction: column;
        align-items: center;
    }

    .cta-btns .btn {
        width: 100%;
        justify-content: center;
    }

    .pipeline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .pipeline-status {
        text-align: left;
    }

    .contact-form {
        padding: 22px 16px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input {
        width: 100%;
    }

    .top-bar-left {
        flex-direction: column;
        gap: 4px;
    }

    .top-bar {
        font-size: 0.75rem;
    }

    .page-banner h1 {
        font-size: 1.6rem;
    }

    .breadcrumb {
        font-size: 0.78rem;
    }

    .section-title {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
    }

    /* Ticker */
    .news-ticker {
        font-size: 0.75rem;
    }
}

/* ---- Very Small: max 400px ---- */
@media (max-width: 400px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 14px;
    }

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

    .hero-badge {
        font-size: 0.68rem;
        padding: 6px 12px;
    }

    .btn {
        padding: 11px 22px;
        font-size: 0.88rem;
    }

    .stat-card {
        padding: 20px 10px;
    }

    .stat-number {
        font-size: 1.7rem;
    }

    .logo-name {
        font-size: 1.1rem;
    }

    .prod-card-img {
        height: 160px;
    }
}

/* ---- Landscape phones: specific fixes ---- */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 70px 0 40px;
    }

    .main-nav {
        padding-top: 70px;
    }
}