/*
|--------------------------------------------------------------------------
| NEW LAYOUT STYLES (Inspired by drmichellerozen.com)
|--------------------------------------------------------------------------
| These styles are designed to be added to your existing CSS.
| They use new class names (drb-*) to avoid conflicts.
*/

/* --- General Section Styles --- */
.drb-section {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Desktop nav dropdown arrows (override inline desktop rule) */
@media (min-width: 769px) {
  .nav-menu .dropdown > a {
    padding-right: 1.25rem !important;
    position: relative;
  }
  .nav-menu .dropdown > a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
    display: inline-block !important; /* override inline display:none */
    color: #000;
  }
  .nav-menu .dropdown:hover > a::after {
    transform: translateY(-50%) rotate(180deg);
  }
}

/* Laptop-friendly testimonials grid */
@media (min-width: 1025px) and (max-width: 1366px) {
  .testimonials-grid { 
    grid-template-columns: repeat(2, 1fr) !important; 
    gap: 1.5rem !important; 
  }
  .testimonials-container { padding: 2rem 1.5rem !important; }
}

/* Form sizing normalization for laptops */
@media (min-width: 769px) and (max-width: 1366px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 0.95rem !important;
    padding: 0.55rem 0.75rem !important;
  }
  .form-submit button,
  button,
  .btn {
    padding: 0.65rem 1.25rem !important;
    font-size: 0.95rem !important;
  }
}

/* --- 1. Intro Section (Hi, I'm Michelle) --- */
.drb-intro-section {
    background-color: #f9f9f9; /* Light background for contrast */
    padding: 1.5rem 2rem;
}

.drb-intro-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 992px) {
    .drb-intro-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.drb-intro-title {
    font-size: 30PX;
    font-weight: 800;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.drb-intro-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

.drb-intro-quote {
    font-style: italic;
    color: var(--primary-teal, #DC2626); /* Use your primary color */
    font-size: 1.2rem;
    border-left: 4px solid var(--primary-teal, #DC2626);
    padding-left: 1rem;
    margin-top: 2rem;
}

.drb-intro-media {
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* Aspect ratio for media frame */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.drb-media-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Rectangle helpers for single images */
.img-rect-16x9 {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.img-frame-16x9 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    overflow: hidden;
    border-radius: 12px;
}

.img-frame-16x9 > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- 2. Science/Experience Section --- */
.drb-science-section {
    padding: 6rem 2rem;
    background-color: #ffffff;
}

.drb-science-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    /* Reverse order for this section to match the reference site's flow */
    grid-template-areas: "media content";
}

.drb-science-content {
    grid-area: content;
}

.drb-science-media {
    grid-area: media;
    position: relative;
    width: 100%;
    padding-bottom: 66.67%; /* Aspect ratio for media frame */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.drb-science-media img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Override any blog-image-container styles within science media */
.drb-science-media .blog-image-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    text-align: left !important;
}

.drb-science-media .blog-image-container img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.drb-science-media .blog-image-container p {
    display: none !important;
}

@media (max-width: 992px) {
    .drb-science-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        grid-template-areas: "content" "media"; /* Content first on mobile */
    }
}

@media (min-width: 992px) {
    .drb-intro-section {
        /* tighter top/bottom spacing on desktop so intro + science fit on one screen */
        padding: 2rem 2rem 1rem;
    }

    .drb-science-section {
        /* reduce gap above and below the second section on desktop */
        padding: 1rem 2rem 2rem;
    }

    .drb-intro-container {
        /* text left, media right: give media a bit more width */
        grid-template-columns: 40% 60%;
        gap: 1.25rem;
    }

    .drb-science-container {
        /* balance media and text so title/description get more width */
        grid-template-columns: 60% 40%;
        gap: 1.25rem;
    }

    .drb-intro-media,
    .drb-science-media {
        /* desktop media height: increase to show more of the video */
        padding-bottom: 45%; /* reduced height */
    }
}

@media (min-width: 1280px) {
    .drb-intro-media,
    .drb-science-media {
        /* extra large screens: slightly taller than desktop */
        padding-bottom: 50%;
    }
}

.drb-science-title {
    font-size: 30PX;
    font-weight: 800;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 2rem;
}

.drb-science-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1rem;
}

/* --- 3. Brands Section --- */
.drb-brands-section {
    padding: 4rem 2rem;
    background-color: #ffffff; /* White background for a cleaner look */
}

.drb-brands-container {
    max-width: 1400px; /* expand container so brand cards can be wider */
    margin: 0 auto;
}

.drb-brands-title {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #111111;
    margin-bottom: 1.25rem;
}

.drb-brands-grid {
    /* Use a horizontally scrollable row by default (mobile-first). Cards will snap into place on touch devices. */
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem;
    scroll-snap-type: x proximity;
    cursor: pointer;
}

.drb-brand-card {
    /* ensure a consistent card width for horizontal scrolling on desktop */
    min-width: 100%;
    flex: 0 0 auto;
}

.drb-brand-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2) !important;
}


.drb-brand-image {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 300px; /* rectangular frame on desktop */
    width: 800px;
    overflow: hidden;
    border-radius: 12px;
    display: block;
    background: #ffffff;
}

.drb-brand-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill rectangular frame, crop as needed */
    object-position: center center;
    display: block;
}

/* Mobile: show one brand card per viewport and scale the image area */
@media (max-width: 768px) {
    .drb-brands-grid {
        padding: 0.5rem 0.5rem;
        gap: 1rem;
    }

    .drb-brand-card {
        min-width: 100% !important;
        flex: 0 0 100% !important; /* one card per view */
        scroll-snap-align: center;
    }

    .drb-brand-image {
        height: calc(56vw); /* responsive height based on viewport width */
        max-width: 100%;
    }
}

/* Desktop: show two brand cards side-by-side (full images visible) */
@media (min-width: 992px) {
    .drb-brands-grid {
        gap: 2rem;
        padding: 1.25rem 2rem;
    }

    .drb-brand-card {
        /* increase each card width slightly so images appear wider while keeping two per view */
        min-width: calc(52% - 1rem);
        flex: 0 0 calc(52% - 1rem);
        scroll-snap-align: center;
    }

    .drb-brand-image {
        /* larger rectangular display on desktop to showcase brands */
        height: 400px; /* increased from 300px */
        max-width: 100%;
    }
}

.drb-brand-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
}

.drb-brand-quote {
    color: white;
    font-size: 1.1rem;
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.drb-brand-logo {
    max-width: 140px;
    max-height: 48px;
    object-fit: contain;
}

.drb-brand-name {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.drb-no-brands {
    text-align: center;
    color: #6b7280;
    grid-column: 1 / -1;
}

/* --- 4. Newsletter Section --- */
.drb-newsletter-section {
    padding: 4rem 2rem 0 2rem; /* Remove bottom padding to connect with footer */
    background-color: #1a1a1a; /* Dark background for the newsletter section */
    color: white;
    text-align: center;
    margin-bottom: 0;
}

.drb-newsletter-container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 4rem; /* Add padding to container instead */
}

.drb-newsletter-title {
    font-size: 30PX;
    font-weight: 700;
    margin-bottom: 2rem;
    line-height: 1.3;
    color: white;
}

.drb-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.drb-newsletter-form input {
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
}

.drb-newsletter-form button {
    background-color: var(--primary-teal, #DC2626); /* Use your primary color */
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.drb-newsletter-form button:hover {
    background-color: var(--dark-teal, #991B1B); /* Use your dark primary color */
}

@media (min-width: 768px) {
    .drb-newsletter-form {
        flex-direction: row;
        gap: 0.5rem;
    }
    .drb-newsletter-form input {
        flex: 1;
    }
    .drb-newsletter-form button {
        flex-basis: 150px;
    }
}

/* --- Programs / Empowerment Section --- */
.drb-programs-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg,#fff,#fbfbfb);
}
.drb-programs-header {

    margin: 0 auto 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.drb-programs-intro {
    font-size: 1.05rem;
    color: #374151;
    max-width: 800px;
}

/* Horizontal carousel */
.drb-programs-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 2rem 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.drb-program-card {
    flex: 0 0 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(2,6,23,0.06);
    overflow: visible;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}
/* Scroll wrapper and controls */
.drb-scroll-wrapper { position: relative; }
.drb-scroll-container { overflow-x: auto; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
.drb-scroll-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.95);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.drb-scroll-button.prev { left: 12px; }
.drb-scroll-button.next { right: 12px; }
.drb-scroll-wrapper:hover .drb-scroll-button,
.drb-scroll-wrapper:focus-within .drb-scroll-button { opacity: 1; }
.drb-scroll-button:focus { outline: 2px solid var(--primary-teal); }

/* Ensure cards snap consistently */
.drb-program-card, .drb-brand-card, .drb-topic-card { scroll-snap-align: start; scroll-snap-stop: always; }
.drb-program-card .program-card-inner {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}
.drb-program-card .program-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.drb-program-card h3 {
    margin: 0; 
    font-size: 1.15rem; 
    color: #111827;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}
.drb-program-card p { 
    color: #475569; 
    font-size: 0.95rem; 
    line-height: 1.6;
    flex: 1;
    overflow: visible;
}
.drb-program-actions { display:flex; gap:0.5rem; padding:1rem; border-top:1px solid #f3f4f6; }
.drb-btn { padding:0.6rem 1rem; border-radius:8px; text-decoration:none; font-weight:700; }
.drb-btn.primary { background:#DC2626; color:white }
.drb-btn.ghost { background:transparent; border:1px solid #e5e7eb; color:#111 }

/* --- Speaking Topics Grid --- */
.drb-topics-section { padding: 3rem 2rem 5rem; background: #ffff }
.drb-topics-grid {
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(280px,1fr));
    gap:2rem;
    margin-top:1rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Larger cards on desktop */
@media (min-width: 1024px) {
    .drb-topics-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .drb-topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.drb-topic-card { 
    background:#fff; 
    border-radius:16px; 
    padding:0; 
    box-shadow:0 8px 24px rgba(2,6,23,0.08); 
    display:flex; 
    flex-direction:column; 
    gap:0; 
    align-items:stretch; 
    overflow:hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.drb-topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(2,6,23,0.12);
}

.drb-topic-icon { font-size:1.5rem; flex-shrink:0; }
.drb-topic-content h4 { margin:0; font-size:1.125rem; color:#111827; font-weight: 700; }
.drb-topic-content p { margin:0; color:#475569; font-size:1rem; line-height: 1.6; }

/* Topic card image styles */
.drb-topic-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
    display: block;
}

@media (min-width: 1024px) {
    .drb-topic-card img {
        height: 280px;
    }
}

.drb-topic-link { display: block; color: inherit; text-decoration: none; }

.drb-topic-card .drb-topic-body { padding: 1.5rem; }

/* Small screen tweaks */
@media (max-width: 767px) {
    .drb-program-card { 
        flex: 0 0 85%; 
        min-height: 320px;
    }
    .drb-programs-carousel { padding-left: 1rem; padding-right: 1rem }
    
    .drb-program-card .program-card-inner {
        padding: 1rem;
    }
    
    .drb-program-card h3 {
        font-size: 1.1rem;
    }
    
    .drb-program-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Full-bleed on large screens: let the programs section span the entire viewport width */
@media (min-width: 992px) {
    .drb-programs-section {
        width: 100vw; /* span viewport */
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: 4rem; /* keep inner padding */
        padding-right: 4rem;
        box-sizing: border-box;
    }

    /* Keep the header content centered and constrained if desired */
    .drb-programs-header {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-right: 0;
    }

    /* Use full-bleed carousel area */
    .drb-programs-carousel {
        padding-left: 4rem;
        padding-right: 4rem;
    }

    /* Hide native scrollbars but keep touch/trackpad/mouse-wheel scrolling enabled */
    .drb-programs-carousel,
    .drb-brands-grid {
        -ms-overflow-style: none; /* IE and Edge */
        scrollbar-width: none; /* Firefox */
    }

    .drb-programs-carousel::-webkit-scrollbar,
    .drb-brands-grid::-webkit-scrollbar {
        display: none; /* Safari and Chrome */
        height: 0;
        width: 0;
    }

    /* Desktop: Make Brands section horizontally scrollable like the reference site */
    .drb-brands-grid {
        display: flex;
        gap: 1.5rem;
        overflow-x: auto;
        padding: 1rem 4rem;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .drb-brands-grid::-webkit-scrollbar { height: 10px; }
    .drb-brands-grid::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 8px; }

    .drb-brand-card {
        flex: 0 0 260px; /* default card width on larger desktops (fallback) */
        scroll-snap-align: start;
    }

    /* keep the brand container visually full-bleed if desired */
    .drb-brands-section {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: 0;
        padding-right: 0;
        box-sizing: border-box;
        background-color: #f0f0f0;
    }
    
    /* On desktop, present Empowerment / Programs as a grid (match Speaking Topics layout) */
    .drb-programs-carousel {
        /* switch to a responsive grid like .drb-topics-grid so cards line up across the full width */
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
        overflow: visible; /* allow shadows to show */
        padding-left: 0;
        padding-right: 0;
    }

/* Brands responsive behavior: show one card at a time on mobile with auto-scroll */
@media (max-width: 767px) {
    .drb-brands-grid { 
        padding-left: 1rem; 
        padding-right: 1rem;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
    }
    .drb-brand-card { 
        flex: 0 0 100%; 
        max-width: 100%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }
    
    /* Hide scroll buttons on mobile - touch only */
    .drb-brands-wrapper .drb-scroll-button {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .drb-brand-card { flex: 0 0 70%; }
}

@media (min-width: 992px) {
    .drb-brand-card { flex: 0 0 calc(50% - 1rem); max-width: calc(50% - 1rem); }
    .drb-brands-grid { padding-left: 4rem; padding-right: 4rem; }
}

    /* Make program cards behave like topic cards on desktop */
    .drb-program-card {
        flex: initial;
        width: auto;
        display: block;
    }
}

/* Laptop and small desktop adjustments */
@media (max-width: 1536px) {
    html { font-size: 15.5px; }
}

@media (min-width: 769px) and (max-width: 1366px) {
    /* Scale down global typography slightly */
    html { font-size: 14.5px; }
    body { font-size: 1.0625rem; }

    /* Tighten navigation spacing */
    nav { padding: 1rem 2rem !important; }
    nav ul { gap: 1.5rem !important; }
    nav a { font-size: 1rem !important; }

    /* Reduce side paddings so content fits comfortably */
    .container, .container-fluid { padding: 0 1.5rem !important; }

    /* Tone down hero text sizes on laptop widths */
    .hero-title,
    .page-hero h1,
    .videos-hero h1,
    .testimonials-hero h1 {
        font-size: clamp(1.75rem, 3.5vw, 2.25rem) !important;
    }
    .hero-description,
    .page-hero p,
    .videos-hero p,
    .testimonials-hero p {
        font-size: 1rem !important;
    }

    /* Login/Secure Portal fine-tuning */
    .login-container,
    .portal-container {
        margin: 2rem auto;
        padding: 1.5rem;
    }
    .login-header h1,
    .portal-header h1 {
        font-size: 1.5rem;
    }
}
