/* ============================================
   White Crown Enterprises - Main Stylesheet
   ============================================ */

/* ============================================
   1. CSS RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    visibility: visible;
}

/* Smooth transitions for theme changes */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Exclude specific elements from global transition */
*:focus, *:hover, button, a, input, textarea, select {
    transition: all 0.3s ease;
}

/* ============================================
   2. CSS VARIABLES - THEME COLORS
   ============================================ */

/* Light Theme (Default) */
:root {
    /* Brand Colors */
    --primary-green: #52B788;
    --primary-dark: #0A3622;
    --accent-green: #7ED957;
    --light-green: #95d5b2;

    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8faf9;
    --bg-alt: #f1faee;
    --card-bg: #ffffff;

    /* Text Colors */
    --text-primary: #0A3622;
    --text-secondary: #2d6a4f;
    --text-muted: #52796f;

    /* UI Elements */
    --border-color: #d5f4e6;
    --border-hover: #52B788;
    --white: #ffffff;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(10, 54, 34, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 54, 34, 0.12);
    --shadow-lg: 0 12px 24px rgba(10, 54, 34, 0.15);
    --shadow-xl: 0 20px 40px rgba(10, 54, 34, 0.2);
}

/* Light Theme Explicit */
[data-theme="light"] {
    --primary-green: #52B788;
    --primary-dark: #0A3622;
    --accent-green: #7ED957;
    --light-green: #95d5b2;
    --bg-primary: #ffffff;
    --bg-secondary: #f8faf9;
    --bg-alt: #f1faee;
    --text-primary: #0A3622;
    --text-secondary: #2d6a4f;
    --text-muted: #52796f;
    --border-color: #d5f4e6;
    --border-hover: #52B788;
    --card-bg: #ffffff;
    --shadow-sm: 0 1px 3px rgba(10, 54, 34, 0.08);
    --shadow-md: 0 4px 12px rgba(10, 54, 34, 0.12);
    --shadow-lg: 0 12px 24px rgba(10, 54, 34, 0.15);
    --shadow-xl: 0 20px 40px rgba(10, 54, 34, 0.2);
}

/* Dark Theme */
[data-theme="dark"] {
    /* Brand Colors - Brighter and more vibrant */
    --primary-green: #52B788;
    --primary-dark: #7ED957;
    --accent-green: #95d5b2;
    --light-green: #40916c;

    /* Backgrounds - Softer, more modern dark grays with green tint */
    --bg-primary: #1a1f1e;
    --bg-secondary: #242b29;
    --bg-alt: #2a3331;
    --card-bg: #242b29;

    /* Text Colors - Better contrast */
    --text-primary: #e8f5e9;
    --text-secondary: #b8d4c4;
    --text-muted: #8fa99a;

    /* UI Elements */
    --border-color: #3d4f48;
    --border-hover: #52B788;
    --white: #ffffff;

    /* Shadows - More pronounced for depth */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.7);
}

/* ============================================
   3. TYPOGRAPHY
   ============================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ============================================
   4. LAYOUT
   ============================================ */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 100px 0;
}

.section-alt {
    background: var(--bg-secondary);
    transition: background-color 0.3s ease;
}

/* ============================================
   5. HEADER & NAVIGATION
   ============================================ */
header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

/* Logo Styles */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Playfair Display', serif;
    letter-spacing: -0.02em;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.logo-text .company-name {
    display: block;
    font-size: 1.1rem;
}

.logo-text .tagline {
    display: block;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-green);
}

.nav-cta {
    background: var(--primary-green);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-cta::after {
    display: none;
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--white) !important;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* ============================================
   6. THEME TOGGLE
   ============================================ */
.theme-toggle {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    width: 60px;
    height: 32px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 16px;
}

.theme-toggle:hover {
    border-color: var(--primary-green);
    transform: scale(1.05);
}

.theme-toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--primary-green);
    border-radius: 50%;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

[data-theme="dark"] .theme-toggle-slider {
    transform: translateX(28px);
}

/* ============================================
   7. HERO SECTION
   ============================================ */
.hero {
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.05) 0%, rgba(149, 213, 178, 0.08) 100%);
    padding: 160px 0 100px;
    margin-top: 76px;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.08) 0%, rgba(126, 217, 87, 0.12) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(126, 217, 87, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: var(--card-bg);
    color: var(--primary-green);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 24px;
    color: var(--text-primary);
    line-height: 1.15;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: 1.35rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   8. BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-green);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--primary-green);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-green);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   9. TRUST BAR
   ============================================ */
.trust-bar {
    background: var(--card-bg);
    padding: 48px 0;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.trust-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.trust-stat h3 {
    font-size: 2.5rem;
    color: var(--primary-green);
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
}

.trust-stat p {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

/* ============================================
   10. SECTION HEADERS
   ============================================ */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 64px;
}

.section-badge {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--primary-green);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.7;
    font-weight: 400;
}

/* ============================================
   11. SERVICES GRID
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-green));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-hover);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.75rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.98rem;
}

/* ============================================
   12. FEATURES GRID
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.feature-item {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    border-color: var(--primary-green);
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
}

.feature-item h3 {
    font-size: 1.35rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.98rem;
}

/* ============================================
   13. INDUSTRIES GRID
   ============================================ */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.industry-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: default;
}

.industry-card:hover {
    border-color: var(--primary-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.industry-card .icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    display: block;
}

.industry-card h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   14. CASE STUDIES
   ============================================ */
.case-studies {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}

.case-study {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    border-left: 4px solid var(--primary-green);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.case-study:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.case-study .metric {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

.case-study h4 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.case-study p {
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

/* ============================================
   15. ABOUT SECTION
   ============================================ */
.about-content {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 64px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.about-content p {
    color: var(--text-muted);
    line-height: 1.9;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.about-content strong {
    color: var(--primary-green);
    font-weight: 600;
}

/* ============================================
   16. CONTACT FORM
   ============================================ */
.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.contact-form {
    background: var(--card-bg);
    padding: 48px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(82, 183, 136, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
    line-height: 1.6;
}

.submit-button {
    background: var(--primary-green);
    color: var(--white);
    padding: 16px 48px;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    font-family: 'Inter', sans-serif;
}

.submit-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   17. FAQ SECTION
   ============================================ */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card-bg);
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 28px 32px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-green);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-green);
    font-weight: 300;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 32px 28px;
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 0.98rem;
}

/* ============================================
   18. FOOTER
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-green));
    color: var(--white);
    padding: 64px 0 32px;
}

[data-theme="dark"] footer {
    background: linear-gradient(135deg, #1a2e27, #2d6a4f);
}

/* Dark theme specific adjustments */
[data-theme="dark"] .hero h1 .highlight {
    background: linear-gradient(135deg, #52B788, #7ED957);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .service-icon {
    background: linear-gradient(135deg, #52B788, #40916c);
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.2);
}

[data-theme="dark"] .feature-item:hover .feature-icon {
    background: linear-gradient(135deg, #52B788, #7ED957);
}

[data-theme="dark"] .nav-cta {
    background: #52B788;
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

[data-theme="dark"] .nav-cta:hover {
    background: #40916c;
}

[data-theme="dark"] .btn-primary {
    background: #52B788;
    box-shadow: 0 4px 12px rgba(82, 183, 136, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    background: #40916c;
    box-shadow: 0 8px 20px rgba(82, 183, 136, 0.4);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-section a:hover {
    color: var(--accent-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* ============================================
   19. SCROLL TO TOP BUTTON
   ============================================ */
.scroll-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background: var(--primary-green);
    color: var(--white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-4px);
}

/* ============================================
   20. ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ============================================
   21. RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

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

    .about-content,
    .contact-form {
        padding: 40px 32px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .logo-img {
        height: 40px;
    }

    .logo-text .company-name {
        font-size: 0.95rem;
    }

    .logo-text .tagline {
        font-size: 0.55rem;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 82px;
        left: 0;
        right: 0;
        background: var(--card-bg);
        padding: 24px;
        box-shadow: var(--shadow-lg);
        gap: 1rem;
        border-top: 1px solid var(--border-color);
        z-index: 999;
    }

    .nav-right {
        gap: 8px;
    }

    .theme-toggle {
        margin-left: 8px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .subtitle {
        font-size: 1.1rem;
    }

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

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

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