:root {
    --primary: #E31E24;
    --primary-dark: #b71c1c;
    --dark: #0f1115;
    --darker: #050507;
    --light: #ffffff;
    --gray: #9ca3af;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-primary {
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--light);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 30, 36, 0.4);
}

.btn-outline {
    border-color: var(--light);
    color: var(--light);
}

.btn-outline:hover {
    background-color: var(--light);
    color: var(--dark);
}

.section {
    padding: 100px 0;
}

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

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.line {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.subtitle {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 5, 7, 0.9);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a:not(.btn) {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--light);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(5, 5, 7, 0.98);
    backdrop-filter: blur(20px);
    overflow-y: auto;
    transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    border-bottom: 1px solid var(--glass-border);
    opacity: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

.mobile-menu.active {
    height: calc(100vh - 90px);
    opacity: 1;
    padding-bottom: 40px;
}

.mobile-menu>a,
.mobile-menu .nav-item {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding: 0;
}

.mobile-menu>a,
.mobile-menu .nav-item>span {
    display: block;
    padding: 20px;
    font-size: 1.1rem;
    color: var(--light);
    text-decoration: none;
    transition: var(--transition);
}

.mobile-menu>a:hover,
.mobile-menu .nav-item>span:hover {
    background: rgba(227, 30, 36, 0.1);
    color: var(--primary);
}

.mobile-menu .dropdown-menu {
    background: rgba(0, 0, 0, 0.3);
}

.mobile-menu .dropdown-menu a {
    font-size: 1rem !important;
    padding: 15px 20px 15px 40px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(227, 30, 36, 0.25), transparent 45%),
        radial-gradient(circle at bottom left, rgba(227, 30, 36, 0.15), transparent 45%),
        linear-gradient(to bottom, var(--darker), var(--dark));
    z-index: -1;
    background-size: 120% 120%;
    animation: gradientPulse 8s ease-in-out infinite alternate;
}

@keyframes gradientPulse {
    0% {
        background-size: 100% 100%;
        filter: brightness(1);
    }

    100% {
        background-size: 130% 130%;
        filter: brightness(1.2);
    }
}

.hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
    animation: meshMove 20s linear infinite;
}

@keyframes meshMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 60px 60px;
    }
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 40px;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 800;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

.hero-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.glass-card h3 {
    margin: 15px 0 10px;
    font-size: 1.3rem;
}

.glass-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

.icon-lg {
    width: 40px;
    height: 40px;
}

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

.service-card {
    background: var(--darker);
    padding: 40px 30px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.03);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(227, 30, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 25px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--gray);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.read-more {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
}

.read-more:hover {
    gap: 10px;
}

/* About / Certificates */
.bg-dark {
    background-color: var(--darker);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.cert-list {
    list-style: none;
    margin-top: 30px;
}

.cert-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--gray);
}

.cert-list li i {
    color: var(--primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.stat-item {
    background: var(--dark);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Testimonials */
.testimonial-slider {
    max-width: 800px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--darker);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--glass-border);
    display: none;
    /* JS will toggle active */
}

.testimonial-card.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.quote-icon {
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.5;
}

.quote-text {
    font-size: 1.4rem;
    font-style: italic;
    margin-bottom: 30px;
    line-height: 1.5;
}

.author strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

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

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background: var(--darker);
    border-radius: 20px;
    padding: 50px;
    border: 1px solid var(--glass-border);
}

.info-item {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    align-items: flex-start;
}

.info-item i {
    color: var(--primary);
    margin-top: 5px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    background: var(--dark);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--light);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.02);
}

/* Footer */
.footer {
    background: var(--darker);
    padding: 50px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.footer-logo {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Animation utilities */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

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

/* Dropdown Navigation */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--darker);
    min-width: 250px;
    padding: 15px 0;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    z-index: 1001;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--gray) !important;
    font-size: 0.9rem !important;
    text-decoration: none;
    transition: var(--transition);
}

.dropdown-menu a:hover {
    color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.03);
    padding-left: 25px;
    /* Indent effect */
}

/* Subpage Hero */
.subpage-hero {
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, rgba(227, 30, 36, 0.1), transparent 60%),
        linear-gradient(to bottom, var(--darker), var(--dark));
    padding-top: 100px;
    /* Account for fixed nav */
    position: relative;
    overflow: hidden;
}

.subpage-hero::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

.subpage-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.breadcrumb {
    color: var(--gray);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 10px;
    opacity: 0.5;
}

/* Page Content */
.page-content {
    padding: 80px 0;
    max-width: 900px;
    margin: 0 auto;
}

.content-block {
    margin-bottom: 60px;
}

.content-block h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--light);
}

.content-block h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: var(--light);
}

.content-block p {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.content-block ul {
    list-style: none;
    margin-bottom: 20px;
    padding-left: 0;
}

.content-block ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: var(--gray);
}

.content-block ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1.4rem;
}

/* Mobile Dropdown Fix */
@media (max-width: 900px) {
    .dropdown-menu {
        position: static;
        background: transparent;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-left: 20px;
        display: none;
    }

    .nav-item.active .dropdown-menu {
        display: block;
    }

    .nav-item>a::after {
        content: '+';
        float: right;
    }

    .nav-links {
        display: none;
        /* Hide default nav links on mobile */
    }

    .mobile-menu-btn {
        display: block;
        /* Show burger menu */
    }

    .mobile-menu {
        /* Ensure mobile menu styles are correct */
        padding-top: 20px;
    }
}

/* =========================================
   Mobile Responsiveness Overhaul
   ========================================= */

@media (max-width: 768px) {

    /* Global Typography */
    html {
        font-size: 14px;
        /* Base scale down */
    }

    .title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Hero Section */
    .hero {
        padding-top: 120px;
        /* Increased from 80px to clear nav + extra space */
        height: auto;
        /* Allow flexible height on mobile */
        min-height: 100vh;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        /* Remove extra top padding here as .hero handles it */
        padding-top: 0;
    }

    /* Boost z-index for fixed elements */
    .navbar {
        z-index: 9999;
    }

    .mobile-menu {
        z-index: 9998;
        top: 90px;
        /* Match navbar height */
    }

    .hero-bg {
        /* Ensure background covers full scrollable height */
        position: fixed;
    }

    .hero-text {
        margin-bottom: 50px;
        /* More space between text and cards */
        width: 100%;
    }

    .hero-text h1 {
        font-size: 2.5rem;
        margin-top: 20px;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-cards {
        width: 100%;
    }

    /* Grids to Single Column */
    .about-grid,
    .stats-grid,
    .contact-wrapper,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        /* Increased gap to prevent "overlaying" feeling */
    }

    /* Adjust padding for sections */
    .section {
        padding: 80px 0;
        /* Increased from 60px for better breathing room */
    }

    .glass-card,
    .service-card {
        padding: 30px 25px;
    }

    /* Contact Form specifics */
    .contact-wrapper {
        padding: 30px;
    }

    /* Subpage Hero */
    .subpage-hero {
        height: auto;
        min-height: 350px;
        padding-top: 140px;
        /* Clear nav safely */
        padding-bottom: 60px;
    }

    .subpage-hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
        padding: 0 15px;
    }
}

@media (min-width: 901px) {
    .mobile-menu {
        display: none !important;
        /* Force hide on desktop */
    }

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