/* ========================================
   3D FLIPPABLE BOOK - CORRECTED VERSION
   ======================================== */

/* --- 8. FOR BRANDS (B2B) WITH 3D FLIPPABLE BOOK --- */

.for-brands {
    background-color: #EAE8E0;
    padding: 120px 0;
    overflow: visible;
}

.b2b-container-flip {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.b2b-header {
    text-align: center;
    margin-bottom: 60px;
}

.b2b-headline {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #2C2C2C;
    margin-bottom: 1rem;
    font-weight: 600;
}

.b2b-description {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: #666;
    line-height: 1.8;
}

/* 3D Book Container */
.book-3d-container {
    perspective: 3000px;
    perspective-origin: center;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 900px;
    padding: 60px 0;
    width: 100%;
    position: relative;
}

/* Book Navigation Arrows */
.book-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #C5A059 0%, #D4B066 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.book-nav-arrow:hover {
    background: linear-gradient(135deg, #D4B066 0%, #E5C177 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.5);
}

.book-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.book-nav-prev {
    left: 20px;
}

.book-nav-next {
    right: 20px;
}

.book-3d {
    position: relative;
    width: 600px;
    height: 800px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
    margin: 0 auto;
}

/* Individual Pages */
.page {
    position: absolute;
    width: 600px;
    height: 800px;
    left: 50%;
    top: 0;
    margin-left: -300px;
    transform-origin: right center;
    transform-style: preserve-3d;
    transition: transform 1.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
}

/* Spread View - Shows both left and right pages */
.spread-view {
    display: flex;
    width: 100%;
    height: 100%;
}

.spread-view .inner-page {
    flex: 1;
    width: 50%;
}

.page.flipped {
    transform: rotateY(-180deg);
}

/* Page Faces */
.page-front,
.page-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.page-front {
    transform: rotateY(0deg);
}

.page-back {
    transform: rotateY(180deg);
}

/* Cover Styles */
.cover-front .page-front {
    background: linear-gradient(135deg, #F5F5F0 0%, #E8E6DF 50%, #FAF8F3 100%);
    border: 3px solid #b07c56;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.15),
        inset 0 0 40px rgba(176, 124, 86, 0.08);
}

.cover-front .page-back {
    background-color: transparent;
    border: none;
    display: none;
}

/* Hide blank page-backs for all interior pages */
#page1 .page-back,
#page2 .page-back {
    background-color: transparent;
    border: none;
    box-shadow: none;
    display: none;
}

.cover-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 60px 50px;
    text-align: center;
    gap: 40px;
}

.cover-logo-img {
    width: 280px;
    height: auto;
    max-width: 80%;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

.cover-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    color: #1d1d1d;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 2px;
    text-shadow: none;
    margin: 0;
}

.cover-collab-button {
    background: linear-gradient(135deg, #b07c56 0%, #c89068 100%);
    color: #FFFFFF;
    font-family: 'Lato', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 18px 45px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(176, 124, 86, 0.3);
}

.cover-collab-button:hover {
    background: linear-gradient(135deg, #c89068 0%, #d4a078 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(176, 124, 86, 0.5);
}

.cover-collab-button:active {
    transform: translateY(-1px);
}

/* Inner Pages */
.inner-page {
    width: 100%;
    height: 100%;
    background-color: #FAF8F3;
    padding: 60px 50px;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.left-page {
    border-right: 1px solid #DDD;
}

.right-page {
    border-left: 1px solid #DDD;
}

.inner-page h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #C5A059;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #C5A059;
}

.inner-page p {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: #2C2C2C;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.intro-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #666;
    font-style: italic;
    text-align: center;
    padding-top: 180px;
    line-height: 2;
}

/* Stats Mini Grid */
.stats-mini-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-top: 2.5rem;
}

.stat-mini {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.15) 0%, rgba(197, 160, 89, 0.05) 100%);
    border-radius: 8px;
    border: 2px solid rgba(197, 160, 89, 0.3);
    transition: all 0.3s ease;
}

.stat-mini:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.2);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: #C5A059;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.stat-label {
    display: block;
    font-family: var(--font-body);
    font-size: 1rem;
    color: #666;
    font-weight: 500;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.2) 0%, rgba(197, 160, 89, 0.1) 100%);
    border-left: 5px solid #C5A059;
    padding: 25px;
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    gap: 20px;
    border-radius: 4px;
}

.highlight-box i {
    font-size: 2.5rem;
    color: #C5A059;
}

.highlight-box span {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: #2C2C2C;
    font-weight: 700;
}

/* Services Mini List */
.services-mini-list {
    list-style: none;
    padding: 0;
    margin: 2.5rem 0;
}

.services-mini-list li {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #2C2C2C;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background-color: rgba(197, 160, 89, 0.05);
    border-radius: 6px;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.services-mini-list li:hover {
    background-color: rgba(197, 160, 89, 0.15);
    transform: translateX(5px);
}

.services-mini-list li i {
    color: #C5A059;
    font-size: 1.25rem;
    margin-top: 3px;
    flex-shrink: 0;
}

.services-mini-list li strong {
    color: #C5A059;
    font-weight: 700;
    display: block;
    margin-bottom: 3px;
}

/* Contact Button */
.contact-mini-button {
    background: linear-gradient(135deg, #C5A059 0%, #D4B066 100%);
    color: #FFFFFF;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 18px 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 2.5rem;
    box-shadow: 0 6px 20px rgba(197, 160, 89, 0.3);
}

.contact-mini-button:hover {
    background: linear-gradient(135deg, #D4B066 0%, #E5C177 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.5);
}

.contact-mini-button:active {
    transform: translateY(-1px);
}

/* Page Decoration */
.page-decoration {
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent 0%, #C5A059 50%, transparent 100%);
    margin-top: 2.5rem;
}

/* Back Cover */
.cover-back .page-front .inner-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px;
}

.back-cover-content p {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    color: #666;
    font-style: italic;
    margin-bottom: 3rem;
}

.social-icons-mini {
    display: flex;
    gap: 25px;
    justify-content: center;
}

.social-icons-mini a {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #C5A059 0%, #D4B066 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.social-icons-mini a:hover {
    background: linear-gradient(135deg, #D4B066 0%, #E5C177 100%);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.5);
}

.outer-back-cover {
    background: linear-gradient(135deg, #FAF8F3 0%, #E8E6DF 50%, #F5F5F0 100%);
    border: 3px solid #b07c56;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    border-radius: 0 8px 8px 0;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.15),
        inset 0 0 40px rgba(176, 124, 86, 0.08);
}

.outer-back-cover p {
    font-family: 'Lato', sans-serif;
    font-size: 1.125rem;
    color: #666666;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Book Instructions */
.book-instructions {
    text-align: center;
    margin-top: 50px;
}

.book-instructions p {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: #666;
    font-style: italic;
}

.book-instructions i {
    color: #C5A059;
    margin-right: 10px;
}

/* Z-index layering for pages */
.cover-front {
    z-index: 4;
}

#page1 {
    z-index: 3;
}

#page2 {
    z-index: 2;
}

.cover-back {
    z-index: 1;
}

/* RESPONSIVE STYLES */

@media (max-width: 1200px) {
    .book-3d {
        width: 550px;
        height: 750px;
    }

    .page {
        width: 550px;
        height: 750px;
        margin-left: -275px;
    }

    .inner-page {
        padding: 50px 40px;
    }

    .cover-logo-img {
        width: 240px;
    }
}

@media (max-width: 968px) {
    .book-3d {
        width: 480px;
        height: 650px;
    }

    .page {
        width: 480px;
        height: 650px;
        margin-left: -240px;
    }

    .b2b-headline {
        font-size: 2.5rem;
    }

    .inner-page {
        padding: 40px 35px;
        overflow-y: auto;
    }

    .inner-page h3 {
        font-size: 1.75rem;
    }

    .cover-logo-img {
        width: 200px;
    }

    .cover-title {
        font-size: 2rem;
    }

    .cover-collab-button {
        font-size: 1rem;
        padding: 15px 35px;
    }
}

@media (max-width: 768px) {
    .b2b-container-flip {
        padding: 0 20px;
    }

    .b2b-headline {
        font-size: 2rem;
    }

    .b2b-description {
        font-size: 1rem;
    }

    .book-3d-container {
        min-height: 550px;
        perspective: 2000px;
    }

    .book-3d {
        width: 440px;
        height: 300px;
    }

    .page {
        width: 440px;
        height: 300px;
        margin-left: -220px;
    }

    .cover-logo {
        font-size: 2.25rem;
        margin-bottom: 2rem;
    }

    .cover-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .cover-subtitle {
        font-size: 1.125rem;
    }

    .inner-page {
        padding: 30px 25px;
    }

    .inner-page h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .inner-page p {
        font-size: 1rem;
    }

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

    .services-mini-list li {
        font-size: 0.95rem;
    }

    .intro-text {
        font-size: 1.25rem;
        padding-top: 100px;
    }
}

@media (max-width: 480px) {
    .book-3d {
        width: 340px;
        height: 250px;
    }

    .page {
        width: 340px;
        height: 250px;
        margin-left: -170px;
    }

    .cover-logo {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .cover-title {
        font-size: 1.5rem;
    }

    .cover-subtitle {
        font-size: 1rem;
    }

    .inner-page {
        padding: 25px 20px;
    }

    .inner-page h3 {
        font-size: 1.25rem;
    }

    .inner-page p {
        font-size: 0.95rem;
    }

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

    .stat-label {
        font-size: 0.9rem;
    }

    .services-mini-list li {
        font-size: 0.9rem;
    }

    .intro-text {
        font-size: 1.125rem;
        padding-top: 80px;
    }

    .book-instructions p {
        font-size: 0.95rem;
    }
}

/* ========================================
   MOBILE MENU HAMBURGER BUTTON
   ======================================== */

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 26px;
    background-color: rgba(255, 255, 255, 0.95);
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 2001;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2.5px;
    background-color: #222 !important;
    display: block !important;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

header.scrolled .mobile-menu-toggle {
    background-color: rgba(255, 255, 255, 0.95);
}

header.scrolled .mobile-menu-toggle span {
    background-color: #222 !important;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Mobile Menu Styles */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: flex !important;
        position: fixed;
        left: 20px;
        top: 20px;
        z-index: 3000;
    }

    header {
        padding: 15px 0 !important;
    }

    .nav-wrapper {
        position: relative;
        justify-content: center;
    }

    .logo {
        display: none !important;
    }

    /* Hide desktop navigation on mobile */
    .nav-left,
    .nav-right {
        display: none !important;
    }

    /* Show navigation when menu is open */
    .nav-left.active,
    .nav-right.active {
        display: flex !important;
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        background: #ffffff;
        flex-direction: column;
        align-items: center;
        z-index: 2500;
        padding: 40px;
        animation: slideDown 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    @keyframes slideUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-left.active {
        top: 0;
        padding-top: 100px;
        justify-content: flex-start;
        height: 100vh;
        border-bottom: 2px solid rgba(176, 124, 86, 0.3);
    }

    .nav-right.active {
        bottom: 0;
        padding-bottom: 60px;
        justify-content: flex-end;
        border-top: 2px solid rgba(176, 124, 86, 0.3);
        animation: slideUp 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    .nav-left a,
    .nav-right a:not([target="_blank"]) {
        color: #1d1d1d !important;
        font-size: 22px !important;
        font-weight: 400 !important;
        margin: 0 0 30px 0 !important;
        padding: 10px 20px !important;
        text-shadow: none !important;
        width: auto !important;
        text-align: center !important;
        letter-spacing: 2px !important;
        text-transform: uppercase !important;
        position: relative !important;
        transition: all 0.3s ease !important;
        display: block !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 3 !important;
        text-decoration: none !important;
        background-color: transparent !important;
        user-select: none !important;
    }

    .nav-left a::after,
    .nav-right a:not([target="_blank"])::after {
        content: '';
        position: absolute;
        bottom: 5px;
        left: 50%;
        transform: translateX(-50%) scaleX(0);
        width: 70%;
        height: 2px;
        background: #b07c56;
        transition: transform 0.3s ease;
    }

    .nav-left a:hover,
    .nav-right a:not([target="_blank"]):hover {
        color: #b07c56 !important;
    }

    .nav-left a:hover::after,
    .nav-right a:not([target="_blank"]):hover::after {
        transform: translateX(-50%) scaleX(1);
    }

    .nav-right a[target="_blank"] {
        margin: 0 20px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto !important;
        cursor: pointer !important;
        z-index: 3 !important;
        position: relative !important;
        transition: all 0.3s ease;
    }

    .nav-right a[target="_blank"]:hover i {
        color: #b07c56 !important;
        transform: scale(1.2);
    }

    .nav-right i {
        font-size: 32px;
        color: #1d1d1d;
        transition: all 0.3s ease;
    }

    body.menu-open {
        overflow: hidden;
    }
}
