/* Royale AI - Master Stylesheet 
   Includes: Dark/Light Mode, Glassmorphism Design, Fixed Spacing, & Mobile Support
*/

/* --- 1. CORE VARIABLES & THEMES --- */
:root {
    --bg-color: #05070a;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #00d2ff;
    --royal-blue: #0072ff;
    --card-bg: #0f172a;
    --border: rgba(255, 255, 255, 0.1);
    --glass: rgba(255, 255, 255, 0.03);
}

[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #0072ff;
    --card-bg: #ffffff;
    --border: rgba(0, 0, 0, 0.1);
    --glass: rgba(0, 0, 0, 0.02);
}

/* --- 2. GLOBAL RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
}

section {
    padding: 60px 0; /* Tightened section spacing */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

/* --- 3. NAVIGATION --- */
header {
    width: 100%;
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    z-index: 1000;
    background: var(--bg-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    opacity: 0.95;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--text-primary), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: 0.3s;
}

.nav-links a:hover { color: var(--accent-color); }

/* --- 4. HERO SECTION --- */
.hero {
        padding-top: 140px !important; /* Increased from 100px to clear the header */
        min-height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* 2. Fix the header height and logo for mobile */
    header {
        height: 70px !important; /* Keeps header slim on mobile */
    }

    /* 3. Ensure the Hero text doesn't have huge top margins */
    .hero-text {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* 4. Shrink the heading slightly if it's still too big */
    .hero-text h1 {
        font-size: 2.2rem !important; 
        line-height: 1.2 !important;
        margin-top: 50px !important;
    }

.highlight {
    color: var(--accent-color);
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.3);
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.4s;
    display: inline-block;
}

.btn.primary {
    background: linear-gradient(45deg, var(--royal-blue), var(--accent-color));
    color: white;
    box-shadow: 0 10px 20px rgba(0, 114, 255, 0.3);
}

.btn.secondary {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: var(--glass);
}

[data-theme="dark"] .btn.secondary { color: white; border-color: var(--border); }

/* --- 5. ABOUT SECTION (GLASS CARDS) --- */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.about-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid var(--border);
    transition: 0.4s ease;
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.about-card i {
    font-size: 2.8rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* --- 6. SERVICES SECTION (MODERN PANEL) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--card-bg);
    border-radius: 25px;
    padding: 20px;
    border: 1px solid var(--border);
    transition: 0.4s;
}

.service-item:hover { transform: scale(1.02); border-color: var(--accent-color); }

.service-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 15px;
}

.price, .tag {
    display: inline-block;
    background: linear-gradient(45deg, var(--royal-blue), var(--accent-color));
    color: white !important;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* --- 7. CONTACT SECTION --- */
.contact-wrapper {
    display: flex;
    gap: 50px;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding-right: 40px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.contact-info i { color: var(--accent-color); font-size: 1.4rem; }

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-form input, .contact-form select {
    background: var(--bg-color);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
}

/* --- 8. FOOTER --- */
.main-footer {
    background: var(--bg-color);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* --- 9. THEME TOGGLE (FLOATING) --- */
.theme-switch-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.theme-label {
    background-color: #111;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    position: relative;
    height: 26px;
    width: 50px;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid var(--accent-color);
}

.ball {
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    height: 20px;
    width: 20px;
    transition: transform 0.2s linear;
}

#theme-toggle { opacity: 0; position: absolute; }
#theme-toggle:checked + .theme-label .ball { transform: translateX(24px); }

/* --- FINAL MOBILE RESPONSIVE OVERRIDE --- */

@media screen and (max-width: 768px) {
    /* 1. Reset Global Section Spacing */
    section {
        padding: 40px 0 !important;
    }

    .container {
        padding: 0 20px !important;
    }

    /* 2. Hero Section Fix */
    .hero {
        padding-top: 100px !important;
        text-align: center !important;
        min-height: auto !important;
        
    }

    .hero-content {
        flex-direction: column !important; /* Forces Stack */
        gap: 30px !important;
    }

    .hero-text {
        width: 100% !important;
    }

    .hero-text h1 {
        font-size: 2.2rem !important; /* Smaller, readable title */
        line-height: 1.2 !important;
    }

    .hero-image {
        width: 100% !important;
        order: -1; /* Puts image above text on mobile */
    }

    .hero-image img {
        width: 85% !important;
        margin: 0 auto !important;
    }

    .hero-btns {
        flex-direction: column !important; /* Stack buttons vertically */
        gap: 15px !important;
    }

    .btn {
        width: 100% !important; /* Easier to click on mobile */
        display: block !important;
    }

    /* 3. About & Services Grid Fix */
    .about-grid, 
    .services-grid {
        grid-template-columns: 1fr !important; /* Single column only */
        gap: 25px !important;
    }

    .service-item img {
        height: 180px !important; /* Prevent huge vertical images */
    }

    /* 4. Contact Section Fix */
    .contact-wrapper {
        flex-direction: column !important; /* Stack Info and Form */
        padding: 25px !important;
        gap: 40px !important;
    }

    .contact-info {
        padding-right: 0 !important;
        text-align: center !important;
    }

    .contact-info p {
        justify-content: center !important; /* Centers icons with text */
        font-size: 0.95rem !important;
    }

    .contact-form {
        width: 100% !important;
    }

    /* 5. Navigation & Header Fix */
    nav {
        flex-direction: column !important;
        gap: 10px;
    }

    .nav-links {
        display: none !important; /* Hide links unless you build a burger menu */
    }

    /* 6. Footer Fix */
    .footer-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 30px !important;
    }

    .footer-section h3::after {
        margin: 8px auto !important; /* Center the blue line */
    }

    .footer-socials {
        justify-content: center !important;
    }
}
