/* CSS Variables for Color Theme */
:root {
    --orchid: #DA70D6;
    --amethyst: #9966CC;
    --lavender-magenta: #EE82EE;
    --white: #FFFFFF;
    --dark-purple: #663399;
    --light-purple: #F0E6FF;
    --text-dark: #333333;
    --text-light: #666666;
    --book-brown: #8B4513;
    --book-spine: #654321;
    --paper-cream: #FDF6E3;
    --paper-shadow: rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: linear-gradient(135deg, #2C1810 0%, #8B4513 50%, #D2B48C 100%);
    background-attachment: fixed;
    min-height: 100%;
}

/* Moving Arrow Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out;
    transform: translate(-50%, -50%);
}

.custom-cursor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 15px solid var(--light-purple);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    transform: translate(-30%, -50%) rotate(45deg);
    filter: drop-shadow(0 0 10px rgba(240, 230, 255, 0.8))
            drop-shadow(0 0 20px rgba(221, 160, 221, 0.6));
    transition: all 0.3s ease-out;
}

.custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 12px solid var(--orchid);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    transform: translate(-25%, -50%) rotate(45deg);
    transition: all 0.3s ease-out;
}

.custom-cursor.hover {
    transform: translate(-50%, -50%) scale(1.3);
}

.custom-cursor.hover::before {
    border-left-color: var(--orchid);
    filter: drop-shadow(0 0 15px rgba(218, 112, 214, 0.9))
            drop-shadow(0 0 30px rgba(218, 112, 214, 0.7));
}

/* Welcome (Ken Burns) background */
.welcome-page {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kenburns-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 110%; /* slightly larger for panning */
    height: 110%;
    background-image: url('Images/danny-greenberg-jZmlo4FXJUI-unsplash.jpg'); /* updated image */
    background-size: cover;
    background-position: center center;
    transform-origin: center center;
    animation: kenburns 28s ease-in-out infinite alternate; /* slower, larger Ken Burns for a more cinematic feel */
    will-change: transform;
    z-index: 1;
}

/* Optional video background (use Images/hero-loop.mp4) */
.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 1;
}

.welcome-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(54,6,69,0.45), rgba(16,8,30,0.55));
    z-index: 2;
}

.welcome-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.welcome-content img {
    width: 110px;
    height: auto;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.welcome-content h1 {
    font-family: 'Outfit', serif;
    font-size: 2rem;
    margin: 0;
}

.welcome-content p {
    opacity: 0.95;
    margin-top: 0.5rem;
}

.enter-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 14px 36px;
    border-radius: 40px;
    background: linear-gradient(90deg, var(--orchid), var(--amethyst));
    color: var(--white);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    box-shadow: 0 8px 30px rgba(153,102,204,0.25);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.enter-btn:hover, .enter-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(153,102,204,0.35);
}

/* Enter button fade-in on load */
.enter-btn {
    opacity: 0;
    transform: translateY(6px);
    animation: enterFade 700ms ease forwards 400ms;
}

@keyframes enterFade {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes kenburns {
    0% {
        transform: scale(1) translate3d(0,0,0);
        filter: brightness(0.95) saturate(0.95);
    }
    50% {
        transform: scale(1.12) translate3d(-3%, -2%, 0);
        filter: brightness(1) saturate(1.05);
    }
    100% {
        transform: scale(1.18) translate3d(2%, -3%, 0);
        filter: brightness(1.02) saturate(1.12);
    }
}

/* Make sure welcome page is responsive */
@media (max-width: 768px) {
    .welcome-content h1 { font-size: 1.6rem; }
    .welcome-content p { font-size: 1rem; }
    .enter-btn { padding: 12px 28px; font-size: 0.95rem; }
    .kenburns-bg { width: 120%; height: 120%; }
}

.custom-cursor.hover::after {
    border-left-color: var(--lavender-magenta);
}

.custom-cursor.click {
    transform: translate(-50%, -50%) scale(0.9) rotate(10deg);
}

/* Cursor Trail Particles */
.cursor-trail {
    position: fixed;
    width: 4px;
    height: 4px;
    background: var(--lavender-magenta);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.8;
    transition: opacity 0.3s ease-out;
}

/* Special cursor states for different elements */
.custom-cursor.text-cursor {
    width: 2px;
    height: 20px;
    border-radius: 1px;
    background: linear-gradient(180deg, var(--orchid), var(--amethyst));
}

.custom-cursor.pointer-cursor {
    transform: translate(-50%, -50%) scale(1.2);
    background: linear-gradient(135deg, var(--orchid), #FF69B4);
    box-shadow: 
        0 0 25px rgba(255, 105, 180, 0.7),
        0 0 50px rgba(255, 105, 180, 0.3);
}

/* Adjust moving arrow for mobile devices */
@media (max-width: 768px) {
    .custom-cursor {
        display: block !important;
        width: 25px;
        height: 25px;
    }
    
    .cursor-trail {
        display: none !important;
    }
}

body {
    font-family: 'Outfit-Regular', 'Outfit', 'Georgia', 'Times New Roman', serif;
    background: linear-gradient(135deg, #2C1810 0%, #8B4513 50%, #D2B48C 100%);
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Book Container */
.book-container {
    position: relative;
    width: 900px;
    height: 600px;
    transform-style: preserve-3d;
}

/* Book Cover */
.book-cover {
    position: absolute;
    width: 900px;
    height: 600px;
    background: linear-gradient(45deg, var(--book-brown), var(--book-spine));
    border-radius: 15px;
    box-shadow: 
        0 0 50px rgba(0,0,0,0.5),
        inset 0 0 50px rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: left center;
    transition: transform 1s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 1000;
    border: 3px solid #654321;
}

.book-cover::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    pointer-events: none;
}

.cover-content {
    text-align: center;
    color: var(--white);
    padding: 2rem;
}

.logo-large {
    margin-bottom: 2rem;
}

.logo-large img {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 50%;
    border: 3px solid var(--white);
}

.logo-large h1 {
    font-size: 2.5rem;
    font-family: 'Outfit-ExtraBold', 'Outfit', 'Georgia', serif;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}

.logo-large h2 {
    font-size: 1.8rem;
    font-family: 'Outfit-Medium', 'Outfit', 'Georgia', serif;
    font-weight: 500;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    color: var(--lavender-magenta);
}

.logo-large p {
    font-size: 1.2rem;
    font-style: italic;
    opacity: 0.9;
}

.open-book-btn {
    background: linear-gradient(45deg, var(--orchid), var(--amethyst));
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.open-book-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    background: linear-gradient(45deg, var(--amethyst), var(--orchid));
}

/* Book Pages Container */
.book {
    position: absolute;
    width: 900px;
    height: 600px;
    display: none;
    transform-style: preserve-3d;
}

.book.opened {
    display: block;
}

/* Page Tabs */
.page-tabs {
    position: fixed;
    top: 50px;
    right: 15px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    visibility: visible;
    opacity: 1;
}

/* ======================================
   Contact page specific styles (improvements)
   Targets classes used in `contact.html` and provides
   a clean responsive layout for mobile and desktop.
   ====================================== */
.header{
    width:100%;
    background: #fff;
    box-shadow: 0 6px 20px rgba(12,12,16,0.06);
    position:sticky;
    top:0;
    z-index:80;
}
.nav-container{
    max-width:1100px;
    margin:0 auto;
    padding:12px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
}
.logo{display:flex;align-items:center;gap:12px}
.logo img{height:48px;width:auto}
.logo span{font-weight:800;letter-spacing:1px;color:var(--text-dark)}
.nav-menu{display:flex;gap:10px;align-items:center}
.nav-menu li{list-style:none}
.nav-menu a{color:var(--text-dark);text-decoration:none;padding:8px 10px;border-radius:8px;font-weight:600}
.nav-menu a.active, .nav-menu a:hover{background:linear-gradient(90deg, rgba(124,58,237,0.06), rgba(224,125,240,0.04));color:var(--dark-purple)}

.page-hero{background:linear-gradient(180deg,#fff,#fbf9ff);padding:40px 0;border-bottom:1px solid rgba(12,12,16,0.03)}
.hero-content{max-width:980px;margin:0 auto;padding:0 20px;text-align:center}
.hero-content h1{font-size:32px;color:var(--dark-purple);margin-bottom:8px}
.hero-content p{color:var(--text-dark);opacity:0.85}

.main-content{max-width:1100px;margin:24px auto;padding:0 20px}
.content-section h2{font-size:22px;color:var(--dark-purple);margin-bottom:12px}

.contact-container{display:flex;gap:28px;align-items:flex-start}
.contact-form-section{flex:1;background:#fff;padding:20px;border-radius:12px;box-shadow:0 10px 30px rgba(12,12,16,0.05)}
.contact-info-section{width:360px}
.contact-info-card{background:#fff;padding:18px;border-radius:12px;box-shadow:0 10px 30px rgba(12,12,16,0.05)}
.contact-info-card h3{margin-bottom:12px;color:var(--dark-purple)}
.contact-item{margin-bottom:12px}
.contact-item p{color:var(--text-dark);margin-top:6px}
.contact-image img{width:100%;border-radius:8px;display:block}

.form-group{margin-bottom:14px}
.form-group label{display:block;font-weight:700;color:var(--text-dark);margin-bottom:6px}
.form-group input,.form-group select,.form-group textarea{
    width:100%;padding:10px 12px;border-radius:8px;border:1px solid rgba(16,16,20,0.06);background:#fff;color:var(--text-dark);font-size:15px
}
.form-group textarea{min-height:120px}
.submit-button{background:linear-gradient(90deg,var(--orchid),var(--amethyst));color:#fff;border:none;padding:12px 18px;border-radius:12px;font-weight:800;cursor:pointer}
.submit-button:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(124,58,237,0.12)}

/* smaller screens: stack the contact layout and make nav wrap */
@media (max-width:900px){
    .nav-container{padding:10px}
    .nav-menu{flex-wrap:wrap;justify-content:center;width:100%;margin-top:8px}
    .logo img{height:40px}
    .contact-container{flex-direction:column}
    .contact-info-section{width:100%}
    .contact-form-section{padding:16px}
    .hero-content h1{font-size:24px}
}

/* very small devices: comfortable tap targets */
@media (max-width:480px){
    .nav-menu a{padding:10px 12px;font-size:14px}
    .hero-content{padding:0 12px}
    .contact-form-section{padding:14px}
    .submit-button{padding:14px;font-size:16px;width:100%}
}


.tab {
    background: var(--amethyst);
    color: var(--white);
    padding: 12px 20px;
    border-radius: 0 15px 15px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: 'Outfit-Medium', 'Outfit', sans-serif;
    font-weight: 500;
    text-align: center;
    box-shadow: 3px 3px 10px rgba(0,0,0,0.3);
    transform: translateX(-10px);
}

.tab:hover {
    background: var(--orchid);
    transform: translateX(0);
}

.tab.active {
    background: linear-gradient(135deg, 
        rgba(139, 69, 19, 0.95), 
        rgba(160, 82, 45, 0.9));
    border: 2px solid rgba(139, 69, 19, 0.8);
    transform: translateX(5px) scale(1.05);
    box-shadow: 
        5px 5px 15px rgba(0,0,0,0.4),
        0 2px 8px rgba(139, 69, 19, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Book Pages */
.book-pages {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.page {
    position: absolute;
    width: 900px;
    height: 600px;
    background: var(--paper-cream);
    border-radius: 15px;
    box-shadow: 
        0 0 30px rgba(0,0,0,0.3),
        inset 0 0 20px rgba(139, 69, 19, 0.1);
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    border: 1px solid #D4B08A;
    display: flex;
}

.page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 23px,
            rgba(139, 69, 19, 0.1) 24px
        );
    pointer-events: none;
    border-radius: 15px;
}

.page-left,
.page-right {
    width: 50%;
    height: 100%;
    padding: 40px;
    position: relative;
}

.page-left {
    border-right: 2px solid rgba(139, 69, 19, 0.2);
}

.page-content {
    height: 100%;
    padding: 1.5rem 2rem 2rem 2rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--amethyst) transparent;
}

.page-content h1 {
    color: var(--amethyst);
    font-size: 2.2rem;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-family: 'Outfit-Bold', 'Outfit', 'Georgia', serif;
    font-weight: 700;
    border-bottom: 2px solid var(--orchid);
    padding-bottom: 10px;
}

.page-content h2 {
    color: var(--dark-purple);
    font-size: 1.8rem;
    margin-bottom: 1.2rem;
    text-align: center;
    font-family: 'Outfit-SemiBold', 'Outfit', 'Georgia', serif;
    font-weight: 600;
}

.page-content h3 {
    color: var(--orchid);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.page-content h4 {
    color: var(--amethyst);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.page-content p {
    color: var(--text-dark);
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.lead-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark-purple);
    font-style: italic;
    text-align: center;
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(218, 112, 214, 0.1);
    border-radius: 10px;
    border-left: 4px solid var(--orchid);
}

/* Home Page Styles */
.hero-image {
    text-align: center;
    margin: 1.5rem 0;
}

.hero-image img {
    width: 100%;
    max-width: 350px;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 3px solid var(--lavender-magenta);
}

.intro-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.intro-card {
    background: rgba(240, 230, 255, 0.5);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--orchid);
}

.intro-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.intro-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.intro-card p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Why Us Page Styles */
.feature-showcase {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    background: rgba(240, 230, 255, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--lavender-magenta);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.expertise-showcase {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.expertise-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.expertise-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.expertise-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.expertise-card p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0;
}

/* Intro Grid for Home Page */
.intro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.intro-item {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.intro-item:nth-child(1) { animation-delay: 0.1s; }
.intro-item:nth-child(2) { animation-delay: 0.2s; }
.intro-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(154, 102, 204, 0.2);
}

.intro-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.intro-item h3 {
    font-size: 1.5rem;
    color: var(--orchid);
    margin-bottom: 1rem;
}

.intro-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.content-item {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(154, 102, 204, 0.2);
}

.content-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.content-item h3 {
    font-size: 1.5rem;
    color: var(--orchid);
    margin-bottom: 1rem;
}

.content-item p {
    color: var(--text-light);
    line-height: 1.8;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-item {
    background: linear-gradient(135deg, var(--light-purple) 0%, var(--white) 100%);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--lavender-magenta);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    border-color: var(--orchid);
    box-shadow: 0 10px 25px rgba(218, 112, 214, 0.2);
}

.service-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.service-item h3 {
    font-size: 1.4rem;
    color: var(--amethyst);
    margin-bottom: 1rem;
}

.service-item p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--amethyst) 0%, var(--orchid) 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 2rem;
    margin: 4rem 0;
    border-radius: 15px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--white);
    color: var(--amethyst);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.cta-button:hover {
    background-color: var(--light-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Footer */
.footer {
    background-color: var(--dark-purple);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
    position: relative;
    z-index: 100;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--lavender-magenta);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--lavender-magenta);
}

/* Page Hero Section */
.page-hero {
    margin-top: 80px;
    background: linear-gradient(135deg, var(--amethyst) 0%, var(--orchid) 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: var(--white);
}

.page-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.page-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Page-specific animations */
.page.active .content-section {
    animation: slideInContent 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

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

.page.active .hero {
    animation: slideInHero 0.6s ease forwards;
    opacity: 0;
}

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

/* Features Container (Why Us page) */
.features-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-box {
    background: var(--white);
    border: 2px solid var(--lavender-magenta);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    border-color: var(--orchid);
    box-shadow: 0 10px 25px rgba(218, 112, 214, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.expertise-item {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.expertise-item:hover {
    transform: translateY(-5px);
}

.expertise-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.expertise-item h3 {
    color: var(--amethyst);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials-section {
    background: var(--light-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-item {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.testimonial-author strong {
    color: var(--amethyst);
    display: block;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Services Detailed Grid (What We Do page) */
.services-detailed-grid {
    display: grid;
    gap: 3rem;
    margin-top: 2rem;
}

.service-detailed {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    align-items: center;
    background: var(--white);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-detailed:nth-child(even) {
    grid-template-columns: 2fr 1fr;
}

.service-detailed:nth-child(even) .service-image {
    order: 2;
}

.service-detailed:nth-child(even) .service-content {
    order: 1;
}

.service-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

.service-content h3 {
    color: var(--amethyst);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-content ul {
    margin-top: 1rem;
    list-style: none;
    padding: 0;
}

.service-content ul li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-content ul li:before {
    content: "✓";
    color: var(--orchid);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Compact Service Layout (New What We Do page) */
.service-compact {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--book-brown);
}

.service-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-icon {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--book-brown);
    flex-shrink: 0;
}

.service-title h3 {
    font-size: 1.2rem;
    color: var(--book-brown);
    margin-bottom: 0.2rem;
}

.service-subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

.service-details p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list li {
    padding: 0.3rem 0;
    padding-left: 1.2rem;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-light);
}

.service-list li:before {
    content: "▸";
    color: var(--book-brown);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.process-section {
    background: rgba(139, 69, 19, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.process-section h4 {
    font-size: 1rem;
    color: var(--book-brown);
    margin-bottom: 0.8rem;
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.step {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 0.2rem 0;
}

/* Process Section */
.process-section {
    background: var(--light-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.process-step {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    position: relative;
}

.step-number {
    background: var(--orchid);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.process-step h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

/* Customers Section */
.customers-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-purple) 100%);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.customers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.customer-segment {
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    border: 2px solid var(--lavender-magenta);
}

.customer-segment img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.customer-segment h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

/* Contact Form Styles */
.contact-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Compact Contact Form */
.contact-form-compact {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row {
    margin-bottom: 0;
}

.form-row.full-width {
    grid-column: 1 / -1;
    margin-bottom: 1rem;
}

.form-row label {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--book-brown);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-row input,
.form-row select,
.form-row textarea {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid rgba(139, 69, 19, 0.3);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--book-brown);
}

.book-submit-btn {
    background: linear-gradient(135deg, var(--book-brown) 0%, var(--book-spine) 100%);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 0.5rem;
}

.book-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Contact Info Grid */
.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 3px solid var(--book-brown);
}

.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-text h4 {
    font-size: 0.9rem;
    color: var(--book-brown);
    margin-bottom: 0.2rem;
}

.contact-text p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.3;
}

/* Small Contact Image */
.contact-image-small {
    text-align: center;
}

.contact-image-small img {
    width: 100%;
    max-width: 200px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--book-brown);
}

.image-caption {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    font-style: italic;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--lavender-magenta);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--orchid);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

/* Form checkbox custom appearance (scoped to form labels). This prevents conflicts
   with the thank-you-page checkmark which is intentionally large and green. */
.checkbox-label input[type="checkbox"] {
    /* hide native checkbox but keep it accessible */
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-label .checkmark {
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid var(--orchid, #7c3aed);
    border-radius: 4px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
    margin-top: 4px;
    flex: 0 0 auto;
    transition: all 0.15s ease-in-out;
    position: relative;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: linear-gradient(135deg, var(--amethyst, #7c3aed), var(--orchid, #a855f7));
    border-color: var(--orchid, #a855f7);
}

.checkbox-label .checkmark::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    opacity: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    opacity: 1;
}

.submit-button {
    background: linear-gradient(135deg, var(--amethyst) 0%, var(--orchid) 100%);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-card {
    background: var(--light-purple);
    padding: 2rem;
    border-radius: 15px;
}

.contact-info-card h3 {
    color: var(--amethyst);
    margin-bottom: 1.5rem;
}

.contact-item {
    margin-bottom: 1.5rem;
}

.contact-item strong {
    color: var(--orchid);
    display: block;
    margin-bottom: 0.5rem;
}

.contact-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
}

/* Style lists inside the contact info card to match the purple brand and
   fit comfortably inside the card with good spacing on mobile. */
.contact-info-card ul {
    list-style: disc;
    list-style-position: inside; /* keep bullets inside the box */
    margin: 0.6rem 0 0 0; /* small top margin, no extra left margin */
    padding-left: 0; /* rely on inside position for alignment */
    color: var(--text, #111827);
}

.contact-info-card ul li {
    margin: 0.35rem 0;
    padding-left: 0.25rem; /* small pad so text doesn't touch bullet */
    line-height: 1.35;
}

/* Make the bullet use the accent color while keeping accessible contrast */
.contact-info-card ul li::marker {
    color: var(--accent, #7c3aed);
    font-size: 1.05em;
}

/* Tighten spacing on very small screens */
@media (max-width:520px) {
    .contact-info-card { padding: 1.25rem; }
    .contact-info-card ul li { margin: 0.25rem 0; }
}

/* Thank You Page Styles */
.thank-you-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.success-icon {
    margin-bottom: 1.5rem;
}

.thank-you-content .checkmark {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 50%;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    line-height: 80px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    animation: checkmarkPulse 1s ease-in-out;
}

@keyframes checkmarkPulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.thank-you-message h2 {
    color: var(--book-brown);
    font-family: 'Outfit-SemiBold', 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.next-steps {
    background: rgba(139, 69, 19, 0.1);
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

.next-steps h3 {
    color: var(--book-brown);
    font-family: 'Outfit-Medium', 'Outfit', sans-serif;
    margin-bottom: 1rem;
    text-align: center;
}

.next-steps ul {
    list-style: none;
    padding: 0;
}

.next-steps ul li {
    padding: 0.5rem 0;
    font-family: 'Outfit-Regular', 'Outfit', sans-serif;
    color: var(--text-dark);
}

.contact-reminder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.go-back-btn,
.home-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-family: 'Outfit-Medium', 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.go-back-btn {
    background: linear-gradient(135deg, var(--book-brown), var(--book-spine));
    color: white;
}

.go-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.3);
}

.home-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: var(--book-brown);
    border: 2px solid var(--book-brown);
}

.home-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* About Page Compact Layout */
.about-summary {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.about-intro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.about-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--book-brown);
    flex-shrink: 0;
}

.about-text .lead-text {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-dark);
    margin: 0;
    font-weight: 500;
}

.about-details p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.company-quote {
    background: rgba(139, 69, 19, 0.1);
    border-left: 4px solid var(--book-brown);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 5px;
}

.company-quote p {
    margin: 0;
    font-style: italic;
    color: var(--book-brown);
    font-size: 0.9rem;
    line-height: 1.4;
}

.company-pillars {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.pillar {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border-radius: 10px;
    border-left: 3px solid var(--book-brown);
}

.pillar h3 {
    font-size: 1rem;
    color: var(--book-brown);
    margin-bottom: 0.5rem;
}

.pillar p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-light);
    margin: 0;
}

.pillar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pillar ul li {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 0.2rem 0;
    padding-left: 1rem;
    position: relative;
}

.pillar ul li:before {
    content: "•";
    color: var(--book-brown);
    position: absolute;
    left: 0;
}

/* FAQ Section */
.faq-section {
    background: var(--light-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.faq-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.faq-item h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

/* Emergency Contact */
.emergency-contact {
    background: linear-gradient(135deg, var(--orchid) 0%, var(--amethyst) 100%);
    color: var(--white);
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
}

.emergency-contact h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.emergency-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.emergency-phone,
.emergency-email {
    background: rgba(255,255,255,0.1);
    padding: 1rem;
    border-radius: 8px;
}

/* About Page Styles */
.about-overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.lead-paragraph {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--amethyst);
    margin-bottom: 1.5rem;
}

.about-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 15px;
}

.mission-vision {
    background: var(--light-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.mission-vision-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.mission-card,
.vision-card,
.values-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.mission-card h3,
.vision-card h3,
.values-card h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

.values-card ul {
    list-style: none;
    padding: 0;
}

.values-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.values-card ul li:before {
    content: "✓";
    color: var(--orchid);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.market-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-purple) 100%);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.market-insight {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--lavender-magenta);
}

.stat-item h4 {
    color: var(--amethyst);
    margin-bottom: 0.5rem;
}

.market-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
}

.approach-section {
    background: var(--light-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.approach-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.approach-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.approach-item h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

.team-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-purple) 100%);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.team-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.team-member h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

.history-section {
    background: var(--light-purple);
    border-radius: 15px;
    padding: 3rem 2rem;
}

.history-content {
    margin-top: 2rem;
}

.history-text h3 {
    color: var(--amethyst);
    margin-bottom: 1rem;
}

.achievements {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
}

.achievements h4 {
    color: var(--orchid);
    margin-bottom: 1rem;
}

.achievements ul {
    list-style: none;
    padding: 0;
}

.achievements ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.achievements ul li:before {
    content: "✓";
    color: var(--orchid);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Modern Floating Navigation Styles */
.nav-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8B4513, #A0522D);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 
        0 15px 50px rgba(139, 69, 19, 0.6),
        0 6px 20px rgba(0,0,0,0.4),
        inset 0 2px 0 rgba(255,255,255,0.4);
    border: 4px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    font-size: 1.6rem;
    font-weight: 900;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    visibility: visible;
    opacity: 1;
    z-index: 10000;
}

.nav-toggle:hover {
    transform: scale(1.1);
    box-shadow: 
        0 12px 40px rgba(139, 69, 19, 0.4),
        0 4px 12px rgba(0,0,0,0.3);
    background: rgba(139, 69, 19, 1);
}

.nav-toggle:active {
    transform: scale(0.95);
}

.nav-close {
    display: none;
}

.nav-icon,
.nav-close {
    font-size: 1.6rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-items {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px;
    border-radius: 20px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 
        0 12px 40px rgba(0,0,0,0.4),
        0 4px 20px rgba(139, 69, 19, 0.3),
        inset 0 1px 0 rgba(255,255,255,0.8);
    border: 2px solid rgba(139, 69, 19, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 180px;
    margin-top: 70px;
}

.page-tabs.expanded .nav-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.page-tabs.expanded .nav-icon {
    display: none;
}

.page-tabs.expanded .nav-close {
    display: block;
}

.page-tabs.expanded .nav-toggle {
    background: rgba(139, 69, 19, 0.8);
    transform: rotate(180deg);
}

.tab {
    padding: 14px 18px;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 16px;
    transform: none;
    margin: 4px 0;
    white-space: nowrap;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(139, 69, 19, 0.85);
    border: 2px solid rgba(139, 69, 19, 0.5);
    color: white;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    gap: 10px;
    min-width: 150px;
    box-shadow: 
        0 2px 8px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.tab-icon {
    font-size: 1.1rem;
    opacity: 0.9;
    transition: all 0.3s ease;
    flex-shrink: 0;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.tab-text {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    color: white;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
    z-index: 0;
}

.tab:hover::before {
    left: 100%;

/* subtle fade-in for the whole content (logo + text + button) */
.welcome-content {
    opacity: 0;
    transform: translateY(8px);
    animation: contentFade 900ms ease forwards 240ms;
}

@keyframes contentFade {
    to { opacity: 1; transform: translateY(0); }
}
}

.tab * {
    position: relative;
    z-index: 1;
}

.tab.active {
    transform: translateX(-8px);
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.9), rgba(139, 69, 19, 0.7));
    color: white;
    font-weight: 600;
    border-color: rgba(255,255,255,0.3);
    box-shadow: 
        0 8px 25px rgba(139, 69, 19, 0.4),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.tab.active .tab-icon {
    opacity: 1;
    transform: scale(1.1);
}

.tab.active .tab-text {
    font-weight: 700;
}

.tab:hover {
    background: rgba(139, 69, 19, 0.25);
    transform: translateX(-4px);
    border-color: rgba(139, 69, 19, 0.2);
}

.tab:hover .tab-icon {
    opacity: 1;
    transform: scale(1.05);
}

.tab.active:hover {
    transform: translateX(-10px);
    box-shadow: 
        0 12px 35px rgba(139, 69, 19, 0.5),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .service-detailed {
        grid-template-columns: 1fr;
    }
    
    .service-detailed:nth-child(even) {
        grid-template-columns: 1fr;
    }
    
    .service-detailed:nth-child(even) .service-image,
    .service-detailed:nth-child(even) .service-content {
        order: unset;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .about-overview {
        grid-template-columns: 1fr;
    }
    
    .market-insight {
        grid-template-columns: 1fr;
    }
}

/* Mobile Landscape & Small Tablets (768px and below) */
@media (max-width: 768px) {
    body {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
        overflow-x: hidden;
        overflow-y: auto;
        min-height: 100vh;
        height: auto;
    }
    
    .book-container {
        width: 100%;
        max-width: 100vw;
        height: auto;
        min-height: auto;
        margin: 0;
        transform: none;
        perspective: none;
    }
    
    .book-cover,
    .book,
    .page {
        width: 100%;
        height: auto;
        min-height: auto;
        transform: none;
    }
    
    .book-cover {
        border-radius: 15px;
        padding: 40px 20px;
    }
    
    .cover-content {
        transform: none;
        perspective: none;
    }
    
    .page-left,
    .page-right {
        padding: 20px 15px;
    }
    
    .page {
        flex-direction: column;
        border-radius: 15px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        margin-bottom: 20px;
        transform: none;
        height: auto;
        min-height: auto;
    }
    
    .page-left,
    .page-right {
        width: 100%;
        height: auto;
        min-height: auto;
        flex: none;
        display: block;
    }
    
    .page-left {
        border-right: none;
        border-bottom: 2px solid rgba(139, 69, 19, 0.3);
        border-radius: 15px 15px 0 0;
        margin-bottom: 10px;
    }
    
    .page-right {
        border-radius: 0 0 15px 15px;
        margin-top: 0;
    }
    
    /* Enhanced Mobile Navigation */
    .page-tabs {
        position: fixed;
        top: 20px;
        right: 10px;
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .nav-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
        background: rgba(139, 69, 19, 0.9);
        border: 2px solid rgba(255, 255, 255, 0.8);
    }

    .nav-items {
        max-width: 180px;
        margin-top: 65px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.98);
        border-radius: 16px;
        border: 2px solid rgba(139, 69, 19, 0.4);
    }
    
    .tab {
        padding: 14px 16px;
        font-size: 0.75rem;
        border-radius: 12px;
        margin: 4px 0;
        min-width: 160px;
        background: rgba(139, 69, 19, 0.9);
        color: white;
        text-align: center;
    }
    
    .tab.active {
        background: linear-gradient(135deg, rgba(139, 69, 19, 1), rgba(160, 82, 45, 0.95));
        transform: scale(1.05);
    }
    
    /* Mobile Scrolling Fix */
    html, body {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    .book, .book-pages {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Mobile Service Items */
    .service-item,
    .service-compact {
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
        padding: 20px 15px;
    }
    
    .service-image {
        width: 80px;
        height: 80px;
        margin: 0 auto 15px auto;
    }
    
    /* Mobile Contact Form */
    .contact-form-compact {
        padding: 20px 15px;
    }
    
    .contact-form-compact .form-group {
        margin-bottom: 15px;
    }
    
    .contact-form-compact input,
    .contact-form-compact textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px;
    }
    
    /* Mobile Typography */
    h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    h3 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }
    
    p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    
    /* Mobile Buttons */
    .btn-primary,
    .cta-button {
        padding: 14px 24px;
        font-size: 0.95rem;
        width: 100%;
        margin: 10px 0;
    }

    .tab {
        min-height: 44px;
        gap: 8px;
    }

    .tab-icon {
        font-size: 1rem;
    }
    
    .tab.active {
        transform: translateX(-6px);
    }

    .tab:hover {
        transform: translateX(-3px);
    }

    .tab.active:hover {
        transform: translateX(-8px);
    }
    
    /* Typography adjustments */
    .logo-large h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }
    
    .logo-large h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .logo-large p {
        font-size: 1rem;
    }
    
    .page-content h1 {
        font-size: 1.9rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .page-content h2 {
        font-size: 1.6rem;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .page-content p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 15px;
    }
    
    /* Enhanced images for mobile */
    .hero-image,
    .service-image,
    .feature-image {
        margin: 15px 0;
        text-align: center;
    }
    
    .hero-image img,
    .service-image img,
    .feature-image img {
        width: 100%;
        max-width: 300px;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    }
    
    /* Contact form mobile optimization */
    .contact-form {
        max-width: 100%;
    }
    
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        font-size: 16px;
        padding: 14px;
        border-radius: 8px;
        border: 2px solid rgba(139, 69, 19, 0.3);
        width: 100%;
        box-sizing: border-box;
    }
    
    .contact-form button {
        font-size: 16px;
        padding: 14px 28px;
        border-radius: 8px;
        min-height: 50px;
    }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    body {
        padding: 10px;
        padding-top: 30px;
    }
    
    .book-container {
        height: auto;
        min-height: 80vh;
        margin: 0;
    }
    
    .book-cover,
    .book,
    .page {
        height: auto;
        min-height: 80vh;
    }
    
    .book-cover {
        border-radius: 12px;
    }
    
    .page {
        border-radius: 12px;
        margin-bottom: 80px; /* Space for navigation */
    }
    
    .page-left,
    .page-right {
        padding: 15px;
        min-height: 40vh;
    }
    
    .page-left {
        border-radius: 12px 12px 0 0;
    }
    
    .page-right {
        border-radius: 0 0 12px 12px;
    }
    
    /* Compact navigation for small screens */
    .nav-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }

    .nav-items {
        max-width: 140px;
        margin-top: 60px;
        padding: 6px;
    }
    
    .tab {
        padding: 10px 12px;
        font-size: 0.65rem;
        border-radius: 12px;
        margin: 2px 0;
        min-width: 120px;
        min-height: 42px;
        gap: 6px;
    }

    .tab-icon {
        font-size: 0.9rem;
    }
    
    .tab.active {
        transform: translateX(-4px);
    }

    .tab:hover {
        transform: translateX(-2px);
    }

    .tab.active:hover {
        transform: translateX(-6px);
    }
    
    /* Compact logo for small screens */
    .logo-large img {
        width: 80px;
        height: auto;
    }
    
    .logo-large h1 {
        font-size: 1.8rem;
        line-height: 1.1;
        margin-bottom: 8px;
    }
    
    .logo-large h2 {
        font-size: 1.3rem;
        line-height: 1.2;
        margin-bottom: 8px;
    }
    
    .logo-large p {
        font-size: 0.9rem;
    }
    
    /* Compact page content */
    .page-content h1 {
        font-size: 1.6rem;
        line-height: 1.2;
        margin-bottom: 12px;
    }
    
    .page-content h2 {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .page-content p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }    
    
    /* Enhanced touch targets */
    .open-book-btn {
        font-size: 16px;
        padding: 12px 24px;
        min-height: 48px;
        border-radius: 8px;
    }
    
    /* Optimized images for small screens */
    .hero-image img,
    .service-image img,
    .feature-image img {
        max-width: 250px;
        border-radius: 10px;
    }
    
    /* Mobile-first contact form */
    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        font-size: 16px;
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .contact-form button {
        width: 100%;
        padding: 14px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
    
    .market-stats {
        grid-template-columns: 1fr;
    }
    
    .emergency-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero,
    .page-hero {
        padding: 2rem 1rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    .content-section {
        padding: 2rem 0;
    }
    
    .features-container,
    .expertise-grid,
    .testimonials-grid,
    .customers-grid,
    .faq-grid,
    .mission-vision-grid,
    .approach-grid,
    .team-grid,
    .intro-grid {
        grid-template-columns: 1fr;
    }
    
    .page {
        position: relative;
        transform: none;
        opacity: 1;
        display: none;
    }
    
    .page.active {
        display: block;
        position: relative;
        transform: none;
        opacity: 1;
    }
}

/* Navigation animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(139, 69, 19, 0.6); }
    100% { transform: scale(1); }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-items .tab {
    animation: slideInRight 0.3s ease-out;
}

.nav-items .tab:nth-child(1) { animation-delay: 0.1s; }
.nav-items .tab:nth-child(2) { animation-delay: 0.15s; }
.nav-items .tab:nth-child(3) { animation-delay: 0.2s; }
.nav-items .tab:nth-child(4) { animation-delay: 0.25s; }
.nav-items .tab:nth-child(5) { animation-delay: 0.3s; }

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .tab:hover {
        background: rgba(139, 69, 19, 0.25);
    }
    
    .tab {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Better touch targets */
    .open-book-btn,
    .contact-form button {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-user-select: none;
        user-select: none;
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Focus states for keyboard navigation */
    .tab:focus,
    .open-book-btn:focus,
    .contact-form button:focus {
        outline: 3px solid rgba(218, 112, 214, 0.6);
        outline-offset: 2px;
    }
    
    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .tab {
            border: 2px solid currentColor;
        }
        
        .tab.active {
            background: var(--amethyst);
            color: white;
        }
    }
    
    /* Mobile adjustments for new compact layouts */
    .service-header {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .service-icon {
        width: 50px;
        height: 50px;
    }

    .service-title h3 {
        font-size: 1.1rem;
    }

    .about-intro {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .about-thumbnail {
        width: 80px;
        height: 80px;
        align-self: center;
    }

    .form-row-group {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .contact-card {
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .contact-text h4 {
        font-size: 0.85rem;
    }

    .contact-text p {
        font-size: 0.75rem;
    }

    .contact-image-small img {
        max-width: 150px;
        height: 100px;
    }

    .service-compact {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .about-summary {
        padding: 1rem;
    }

    .company-pillars {
        gap: 1rem;
    }

    .pillar {
        padding: 0.8rem;
    }

    .process-section {
        padding: 0.8rem;
    }

    /* Thank You page mobile adjustments */
    .thank-you-content {
        padding: 1.5rem;
    }

    .thank-you-content .checkmark {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        line-height: 60px;
    }

/* Scoped thank-you checkmark (mobile variant). Keeps the large green circle limited to thank-you pages. */
    .thank-you-content .checkmark {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        line-height: 60px;
    }

    .thank-you-message h2 {
        font-size: 1.3rem;
    }

    .next-steps {
        padding: 1rem;
    }

    .action-buttons {
        gap: 0.8rem;
    }

    .go-back-btn,
    .home-btn {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    /* Reduced motion preferences */
    @media (prefers-reduced-motion: reduce) {
        .tab,
        .page,
        .book-cover {
            transition: none !important;
            animation: none !important;
        }
        
        .tab.active {
            transform: none;
        }
    }
}

/* --------------------------------------------------------------------- */
/* Merged styles_modern.css (appended)                                     */
/* The rules below were previously in `styles_modern.css`. Keeping them    */
/* here ensures the modern overrides load after legacy rules in this file. */
/* --------------------------------------------------------------------- */
/* Modern stylesheet variables and small-scope helper rules */
:root{
    --accent:#6d28d9; /* purple */
    --accent-2:#7c3aed;
    --muted:#6b7280;
    --bg:#ffffff;
    --dark:#111217;
}

.container{max-width:1100px;margin:0 auto;padding:0 20px}

/* --- Overrides to disable legacy book layout in styles.css --- */
/* Applied when using the modern homepage */
body.modern-home{
    display: block !important;
    justify-content: normal !important;
    align-items: normal !important;
    perspective: none !important;
    min-height: auto !important;
    background: var(--bg) !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
}

/* Hide book-specific containers so they don't overlap the modern layout */
.book-container, .book, .book-cover, .page-tabs {
    display: none !important;
    visibility: hidden !important;
}

/* Ensure header is sticky and separated from content */
.site-header{position:relative;z-index:40;background:transparent;padding:18px 0}
.header-inner{max-width:1100px;margin:0 auto;padding:0 20px}

/* Modern navbar visual treatment (2025-style): glass panel, rounded, pill CTAs */
.site-header .header-inner{
    display:flex;align-items:center;justify-content:space-between;gap:18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(250,250,250,0.86));
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border-radius:14px;
    padding:10px 18px;
    box-shadow: 0 10px 30px rgba(12,12,20,0.08);
}

.logo{display:flex;align-items:center;gap:12px}
.logo img{height:44px}
.logo span{font-weight:800;color:#111827;letter-spacing:1px}

.main-nav{display:flex;align-items:center;gap:10px}
.main-nav a{color:var(--dark, #111827);text-decoration:none;padding:8px 10px;border-radius:10px;font-weight:600;transition:all 180ms ease}
.main-nav a:hover{color:var(--accent);background:linear-gradient(90deg,rgba(124,58,237,0.06),rgba(218,112,214,0.02));transform:translateY(-1px)}

/* Active link style */
.main-nav a.active{background:linear-gradient(90deg,#e07df0,#7c3aed);color:#fff;box-shadow:0 8px 30px rgba(124,58,237,0.12)}

/* Webmail as a prominent pill CTA */
.main-nav .nav-webmail{padding:8px 14px;border-radius:999px;color:#fff;background:linear-gradient(90deg,#e07df0,#7c3aed);box-shadow:0 10px 30px rgba(124,58,237,0.18);font-weight:800;text-decoration:none}
.main-nav .nav-webmail:hover{opacity:0.97;transform:translateY(-1px)}

/* Home link variant that matches the Admin/Webmail pill styling for pages
   where the navbar only shows a HOME CTA (e.g., contact page). */
.main-nav .nav-home{
    padding:8px 14px;border-radius:999px;color:#fff;background:linear-gradient(90deg,#e07df0,#7c3aed);box-shadow:0 10px 30px rgba(124,58,237,0.18);font-weight:800;text-decoration:none;display:inline-block
}
.main-nav .nav-home:hover{opacity:0.97;transform:translateY(-1px)}

/* Outline button variant (Contact) tuned to modern look */
.main-nav .btn-outline{border:1px solid rgba(16,24,40,0.06);padding:8px 12px;border-radius:12px;background:transparent;color:var(--dark);font-weight:700}

/* Responsive tweaks: keep header compact on small screens */
@media (max-width:720px){
    .site-header .header-inner{padding:8px 12px;border-radius:10px}
    .main-nav a{padding:8px 10px;font-size:14px}
    .main-nav .nav-webmail{padding:8px 12px;font-size:14px}
}

/* Slight global typography improvements */
body.modern-home, body.modern-home p, body.modern-home h1, body.modern-home h2, body.modern-home h3 {
    color: #111827;
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
}

/* Add comfortable vertical rhythm for sections */
section{padding-top:36px;padding-bottom:36px}


.site-header{background:transparent;padding:18px 0}
.header-inner{display:flex;align-items:center;justify-content:space-between}
.logo img{height:44px}
.main-nav a{margin-left:18px;color:var(--dark);text-decoration:none}
.main-nav .btn-outline{border:1px solid #e5e7eb;padding:8px 12px;border-radius:8px}

.modern-hero{padding:60px 0;display:flex;align-items:center}
/* Split-layout hero: on wide screens use a two-column grid (copy + image card).
    On narrower screens this falls back to the stacked column rules defined
    in the responsive section below (max-width:900px). */
.modern-hero .hero-inner{display:grid;grid-template-columns:1fr 420px;gap:40px;align-items:center;max-width:1100px;width:100%}
.hero-copy{flex:unset;text-align:left}
.hero-copy h1{font-size:40px;line-height:1.05;margin:0 0 12px}
.hero-copy .accent{color:var(--accent)}
.lead{color:var(--muted);max-width:560px}
.hero-actions{margin-top:18px}
.btn-primary{background:var(--accent);color:#fff;padding:12px 20px;border-radius:10px;text-decoration:none;margin-right:12px}
.btn-ghost{background:transparent;border:1px solid #ddd;padding:10px 18px;border-radius:10px;text-decoration:none;color:var(--dark)}
.hero-media{display:flex;align-items:center;justify-content:center}
.hero-card{width:100%;max-width:420px;border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(12,12,16,0.15);transform:translateY(6px);background:#fff}
.hero-card img{width:100%;height:100%;object-fit:cover;display:block}

/* Decorative left-edge gradient on the image card to tie image into brand color */
.hero-card{position:relative}
.hero-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:16%;pointer-events:none;background:linear-gradient(90deg,rgba(124,58,237,0.12),rgba(124,58,237,0));mix-blend-mode:normal}

/* Badge overlay on the image card (e.g., Featured / price) */
.hero-badge{position:absolute;top:12px;left:12px;display:flex;flex-direction:column;gap:6px;z-index:30}
.hero-badge .badge-label{background:rgba(255,255,255,0.96);padding:6px 10px;border-radius:999px;font-weight:700;color:var(--accent);font-size:12px;box-shadow:0 6px 16px rgba(12,12,16,0.08)}
.hero-badge .badge-price{background:#fff;padding:6px 10px;border-radius:8px;font-weight:700;color:#111827;font-size:13px;border:1px solid rgba(12,12,16,0.04)}

/* Slight visual tweak: subtle highlight at the bottom of the card */
.hero-card::after{content:"";position:absolute;left:0;right:0;bottom:0;height:28%;background:linear-gradient(180deg,transparent,rgba(12,12,16,0.03));pointer-events:none}

.why-choose{padding:60px 0}
.why-grid{display:grid;grid-template-columns:1fr 1fr;gap:36px;align-items:center}
.why-image img{width:100%;border-radius:12px}
.why-copy h2{font-size:28px;margin-bottom:8px}
.why-list{margin-top:14px;color:var(--muted);line-height:1.6}

.properties{padding:36px 0}
.section-head h3{font-size:22px;margin-bottom:6px}
.muted{color:var(--muted)}
.listings-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:12px}
.card{background:#fff;border-radius:10px;box-shadow:0 6px 18px rgba(12,12,16,0.06);overflow:hidden}
.card img{width:100%;height:180px;object-fit:cover}
.card-body{padding:12px}
.price{color:var(--accent);font-weight:700}

.inquiry{padding:48px 0}
.inquiry-grid{display:grid;grid-template-columns:1fr 380px;gap:28px;align-items:center}
.inquiry-form form{display:flex;flex-direction:column;gap:10px}
.inquiry-form label{font-size:13px;color:var(--muted)}
.inquiry-form input,.inquiry-form select{padding:10px;border-radius:8px;border:1px solid #e6e6e9}
.inquiry-image img{width:100%;border-radius:12px}

/* Pull the section after the hero up a bit to tighten flow */
.modern-hero + section { padding-top:18px; }

.blog{padding:48px 0}
.blog-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.blog-card img{width:100%;height:160px;object-fit:cover;border-radius:8px}
.blog-card h4{margin:8px 0 0;font-size:15px}

.become-agent{background:#fdecec;padding:36px 0}
.cta-inner{display:flex;align-items:center;justify-content:space-between}

/* Footer: choose a dark plum/charcoal palette that matches the site's purple accents.
     Use light text and purple-accent links for good contrast and brand cohesion. */
.site-footer.dark{
    background: linear-gradient(180deg,#0b0b10 0%, #0f0712 100%);
    color: #e6e7eb; /* light gray for body text */
    padding:36px 0;
    border-top: 4px solid rgba(124,58,237,0.06); /* subtle purple separator */
}
.footer-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:20px;align-items:start}
.footer-col{color: #d1d5db}
.footer-logo{height:44px;margin-bottom:12px}

/* Footer links: remove default blue, use accent color and no bullets */
.footer-col ul{list-style:none;padding-left:0;margin:0}
.footer-col ul li{margin:8px 0}
.footer-col a{color:var(--accent);text-decoration:none;font-weight:600}
.footer-col a:hover{color:var(--accent-2);text-decoration:underline}

/* Support text and muted items should be readable on dark background */
.site-footer.dark .muted{color: #a8b0bd}

/* Responsive: stack footer columns on small screens */
@media (max-width:720px){
    .footer-grid{grid-template-columns:1fr;gap:16px}
    .cta-inner{flex-direction:column;gap:12px}
}

/* Responsive */
@media (max-width:900px){
    .hero-inner{flex-direction:column}
    .hero-media img{width:100%}
    .listings-grid{grid-template-columns:repeat(2,1fr)}
    .why-grid{grid-template-columns:1fr}
    .inquiry-grid{grid-template-columns:1fr}
}
@media (max-width:520px){
    .listings-grid{grid-template-columns:1fr}
    .blog-grid{grid-template-columns:1fr}
    .hero-copy h1{font-size:26px}
}

/* End modern homepage styles */

/* --- Welcome page centering overrides --- */
.welcome-page{
    /* Ensure the welcome container fills the viewport and centers its content
         This targets both <body class="welcome-page"> and <main class="welcome-page"> */
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.welcome-page .welcome-content{
    text-align:center !important;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:12px;
    max-width:720px;
    margin:0 auto;
    padding:28px 20px;
    z-index:3;
    color:#fff;
}

.welcome-page .welcome-content img{
    width:96px;
    height:auto;
    border-radius:50%;
    box-shadow:0 6px 20px rgba(0,0,0,0.35);
}

.welcome-page .welcome-content h1{
    font-size:34px;
    line-height:1.05;
    margin:0;
    font-weight:800;
    color:var(--bg, #fff);
}

.welcome-page .welcome-content p{
    color:rgba(255,255,255,0.9);
    max-width:520px;
}

.welcome-page .enter-btn{
    margin-top:12px;
    padding:12px 28px;
    border-radius:30px;
}

@media (max-width:520px){
    .welcome-page .welcome-content h1{font-size:26px}
    .welcome-page .welcome-content img{width:84px}
    .welcome-page .welcome-content{padding:18px}
}

/* --- Site-root hero: center branding, logo ring, tuned typography and lower-third Enter CTA --- */
.modern-hero{
    /* Slightly tighter hero to reduce excessive white space while keeping good rhythm */
    min-height:78vh; /* keep strong above-the-fold presence but not overly tall */
    display:flex;
    align-items:center;
    justify-content:center;
    position:relative;
    overflow:hidden;
    padding-top:28px; /* reduced */
    padding-bottom:28px; /* reduced */
}
.modern-hero .hero-inner{display:flex;flex-direction:column;align-items:center;gap:18px;max-width:980px}
.modern-hero .hero-copy{flex:unset;text-align:center}
.modern-hero .hero-copy h1{font-size:44px;line-height:1.02;font-weight:900}
.modern-hero .hero-copy .lead{max-width:640px;font-size:16px}

.hero-logo img{width:110px;height:110px;border-radius:50%;padding:12px;background:#fff;border:6px solid rgba(218,112,214,0.18);box-shadow:0 8px 30px rgba(0,0,0,0.25);} 
.hero-logo{margin-bottom:6px}

/* Purple gradient button tuned to match welcome style */
.btn-primary{background:linear-gradient(90deg,#e07df0,#7c3aed);box-shadow:0 10px 30px rgba(124,58,237,0.18);padding:12px 26px;border-radius:28px}
.btn-primary:hover{transform:translateY(-3px);box-shadow:0 16px 40px rgba(124,58,237,0.22)}

/* By default hide any stray .enter-hero elements that are not inside the hero.
    This prevents cached or legacy pages from showing the CTA in the wrong place. */
.enter-hero{display:none !important}

.modern-hero .enter-hero{
    /* Position the Enter CTA inside the hero (absolute to the hero container)
        so it doesn't stay fixed over the entire page and overlay other sections. */
    display:inline-block !important;
    position:absolute;
    left:50%;
    transform:translateX(-50%);
    bottom:12%;
    top:auto;
    z-index:60;
    background:linear-gradient(90deg,#da70d6,#7c3aed);
    color:#fff;padding:12px 28px;border-radius:32px;text-decoration:none;font-weight:800;letter-spacing:1px;box-shadow:0 12px 40px rgba(124,58,237,0.18);
}

/* Page overlay for full-screen transition from Enter button */
.page-overlay{
    position:fixed;
    width:28px;
    height:28px;
    border-radius:50%;
    transform:translate(-50%,-50%) scale(0);
    transition:transform 700ms cubic-bezier(.2,.9,.2,1), opacity 700ms ease;
    z-index:9999;
    opacity:0;
    pointer-events:none;
    background:linear-gradient(90deg,#d86ce6,#7c3aed);
}
.page-overlay.expand{transform:translate(-50%,-50%) scale(120);opacity:1}

/* When on the standalone welcome page, hide other site UI that may overlap
     (header/hero from the main site). This prevents elements from index-book.html
     or legacy book UI from showing through when the welcome is the current view. */
.welcome-page .site-header,
.welcome-page .modern-hero,
.welcome-page .enter-hero,
.welcome-page .book-container,
.welcome-page .book,
.welcome-page .book-cover,
.welcome-page .page-tabs {
    display: none !important;
    visibility: hidden !important;
}

/* Tune welcome typography */
.welcome-page .welcome-content h1{font-size:44px;font-weight:900;margin:6px 0 4px;letter-spacing:-0.5px}
.welcome-page .welcome-content p{font-size:16px;max-width:560px}
.welcome-page .enter-btn{background:linear-gradient(90deg,#e07df0 0%, #7c3aed 100%);padding:14px 32px;border-radius:30px;font-weight:800;box-shadow:0 12px 36px rgba(124,58,237,0.18);text-transform:uppercase}
.welcome-page .welcome-content img{width:98px;height:98px;padding:14px;border-radius:50%;background:#fff;border:8px solid rgba(124,58,237,0.12);box-shadow:0 10px 30px rgba(0,0,0,0.3)}

@media (max-width:520px){
    .welcome-page .welcome-content h1{font-size:28px}
    .welcome-page .welcome-content p{font-size:14px}
    .welcome-page .enter-btn{padding:10px 22px}
}

@media (max-width:900px){
    .modern-hero .hero-inner{padding:40px}
    .modern-hero .hero-copy h1{font-size:32px}
    .modern-hero .enter-hero{bottom:10%}
}

@media (max-width:520px){
    /* Mobile: ensure hero headline stays readable and centered, hide decorative
        logo, and reduce top padding so the hero sits closer beneath the header.
        Make the header sticky with a subtle background so it never overlays
        content unexpectedly. Also stack and space action buttons for touch.
    */
    .modern-hero .hero-copy h1{font-size:28px}
    /* Hide decorative logo ring on small screens to reduce clutter */
    .hero-logo{display:none !important}
    /* Make header sticky on small screens and give it a translucent background
        so it reads over the page content without hiding it. */
    .site-header{position:sticky;top:0;background:rgba(255,255,255,0.96);backdrop-filter:blur(4px);z-index:60;padding:12px 0}
    /* Reduce hero top padding so content sits up under the header without a
        large empty gap; keep a small safe area instead. */
    .modern-hero{padding-top:18px;min-height:calc(100vh - 64px)}
    /* Increase vertical rhythm inside the hero on small screens */
    .modern-hero .hero-inner{gap:20px;padding:14px}
    /* Stack action buttons vertically, center them, and add spacing below so
        they don't sit directly on top of the picture underneath. */
    .hero-actions{display:flex;flex-direction:column;gap:12px;align-items:center;margin-bottom:20px}
    .modern-hero .enter-hero{bottom:10%;padding:10px 20px}
    /* Make primary CTA wider and easier to tap on mobile */
    .hero-actions .btn-primary{width:92%;padding:14px 20px;font-size:18px;border-radius:30px}
    .hero-actions .btn-ghost{width:72%;padding:12px 16px}
}

/* Mobile/tablet: prevent navbar links from overlapping when the header is narrow.
     Wrap nav items onto a centered line beneath the logo and make the contact
     button behave like the other links (no left-margin pushing). This is a
     minimal responsive fix; if you want a hamburger menu instead I can add
     that next. */
@media (max-width:720px){
    .header-inner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
    .logo{order:0}
    .main-nav{order:1;width:100%;display:flex;justify-content:center;gap:12px;flex-wrap:wrap;padding-top:6px}
    .main-nav a{display:inline-block;margin:6px 8px;white-space:nowrap;padding:6px 8px}
    .main-nav .btn-outline{margin-left:0;padding:8px 12px}
    /* Ensure header sits above content on small screens */
    .site-header{z-index:120}
}

/* Additional mobile fixes to centralize and space content nicely on small screens */
@media (max-width:520px){
    /* make the site container comfortable on narrow screens */
    .container{padding-left:16px;padding-right:16px;margin:0 auto;max-width:100%}

    /* center main copy blocks and ensure readable type rhythm */
    .hero-copy, .why-copy, .page-content, .intro-card, .blog-card h4 {text-align:center}
    .hero-copy h1, .page-content h1, .page-content h2 {margin-left:auto;margin-right:auto}

    /* stack grids vertically and center items */
    .hero-inner{grid-template-columns:1fr;align-items:center;padding:12px}
    .inquiry-grid, .why-grid, .listings-grid, .blog-grid{grid-template-columns:1fr;gap:18px}
    .inquiry-grid{justify-items:center}

    /* Ensure media/cards don't overflow and sit centered */
    .hero-media, .hero-card, .inquiry-image, .card, .blog-card{width:100%;max-width:520px;margin-left:auto;margin-right:auto}
    .hero-card img, .inquiry-image img, .card img, .blog-card img{width:100%;height:auto;object-fit:cover}

    /* Make CTAs easier to tap */
    .hero-actions{display:flex;flex-direction:column;gap:12px;align-items:center}
    .btn-primary, .btn-ghost, .book-submit-btn{width:100%;max-width:480px}

    /* Nav: compact and centered, avoid overlap */
    .main-nav{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
    .main-nav a{padding:8px 10px;margin:6px}

    /* Footer columns stack and center */
    .footer-grid{grid-template-columns:1fr;text-align:center}
    .footer-col{margin-left:auto;margin-right:auto}

    /* Slightly smaller images in card lists to keep vertical rhythm */
    .card img{height:160px}

    /* Reduce large hero paddings so content sits nicely above the fold */
        .modern-hero{padding-top:12px;padding-bottom:18px;min-height:0}

    /* Improve inquiry form spacing */
    .inquiry-form{width:100%;max-width:520px}
    .inquiry-form form{gap:12px}

    /* Fix any leftover book-layout centering issues */
    .book-container, .book, .book-cover{display:none !important}
}

    /* Extra defensive mobile fixes for pages that don't use the modern-home body class
         Ensure the site doesn't keep the desktop centering (display:flex) on small screens
         which causes horizontal layout issues and huge empty gutters. */
    @media (max-width:900px) {
        /* Make the root page flow normally on small devices */
        body {
            display: block !important;
            align-items: normal !important;
            justify-content: normal !important;
            padding: 10px 0 !important;
            perspective: none !important;
        }

        /* Strong centering for contact page on small screens */
        @media (max-width:900px) {
            /* Restrict main content width and center it */
            .main-content {
                max-width: 820px !important;
                margin: 14px auto !important;
                padding-left: 12px !important;
                padding-right: 12px !important;
                box-sizing: border-box !important;
            }

            /* Ensure the contact container centers and stacks cleanly */
            .contact-container {
                display: flex !important;
                flex-direction: column !important;
                gap: 18px !important;
                align-items: stretch !important;
                max-width: 820px !important;
                margin: 0 auto !important;
                padding: 0 !important;
            }

            .contact-form-section, .contact-info-section {
                width: 100% !important;
                max-width: 100% !important;
                margin: 0 auto !important;
                box-sizing: border-box !important;
            }

            .contact-info-card, .contact-form {
                padding: 18px !important;
                margin: 0 auto !important;
            }
        }

        @media (max-width:520px) {
            /* Make form and info comfortable on very small screens */
            .main-content { padding-left: 12px !important; padding-right: 12px !important; }
            .contact-info-card, .contact-form { padding: 14px !important; }
            .contact-image img { border-radius: 8px; max-width: 100%; height: auto; display:block; margin: 12px auto; }
            .submit-button { width: 100% !important; padding: 14px 16px !important; }
            .contact-info-section { padding-left: 0 !important; padding-right: 0 !important; }
            /* Make sure hero and header don't push content off-screen */
            .page-hero, .hero-content { padding-left: 12px !important; padding-right: 12px !important; text-align: center; }
        }

        /* Ensure containers fill the width and center their content */
        .container, .main-content, .page-hero, .footer-content {
            max-width: 100% !important;
            margin: 0 auto !important;
            padding-left: 14px !important;
            padding-right: 14px !important;
        }

        /* Header & nav: wrap and center links to avoid overlap */
        .header { position: sticky; top: 0; background: rgba(255,255,255,0.98); z-index: 140; }
        .nav-container { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; padding:10px 12px; }
        .nav-menu { width:100%; display:flex; justify-content:center; gap:8px; flex-wrap:wrap; padding:6px 0; }
        .nav-menu li { margin:0; }

        /* Contact page: stack left/right columns and make them full width */
        .contact-container { flex-direction: column !important; gap:18px !important; align-items: stretch !important; }
        .contact-form-section, .contact-info-section { width: 100% !important; max-width: 100% !important; }
        .contact-info-card { width: 100% !important; box-sizing: border-box; }

        /* Ensure images and cards are responsive and centered */
        .contact-image img, .hero-card img, .card img, .blog-card img { width: 100% !important; height: auto !important; max-width: 100% !important; }

        /* Make primary actions and form buttons easy to tap */
        .submit-button, .btn-primary, .btn-ghost, .book-submit-btn { width: 100% !important; max-width: 100% !important; }

        /* Footer stack */
        .footer-grid { grid-template-columns: 1fr !important; text-align: center; }
    }
