/* CSS Variables & Reset */
:root {
    /* Colors */
    --color-primary-blue: #0a2342;
    /* Deep Professional Blue for text/details */
    --color-vibrant-blue-start: #235aa6;
    /* Lighter vibrant blue */
    --color-vibrant-blue-end: #102a52;
    /* Darker vibrant blue */
    --color-accent-orange: #ff6b00;
    /* Vibrant Orange */
    --color-accent-orange-hover: #e65100;
    /* Darker orange for hover */
    --color-text-dark: #333333;
    --color-text-light: #f4f4f4;
    --color-white: #ffffff;
    --color-bg-light: #f9f9f9;

    /* Spacing */
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Transition */
    --transition-speed: 0.3s;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--color-primary-blue);
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--transition-speed), transform 0.2s;
    border: none;
    font-size: 1rem;
    white-space: nowrap;
}

.btn i {
    margin-right: 0.5rem;
}

.btn:hover {
    transform: translateY(-2px);
}

/* Primary Action Button (Orange) */
.btn-action,
.btn-primary {
    background-color: var(--color-accent-orange);
    color: var(--color-white);
    box-shadow: 0 4px 6px rgba(255, 255, 255, 0.137);
}

.btn-action:hover,
.btn-primary:hover {
    background-color: var(--color-accent-orange-hover);
}

/* Secondary Button (Blue Ghost or Solid) */
.btn-secondary {
    background-color: var(--color-primary-blue);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-blue);
}

/* Header & Navbar */
.header {
    background-color: var(--color-white);
    /* White background */
    color: var(--color-text-dark);
    /* Dark text */
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary-blue);
    /* Dark blue logo text */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-menu-btn {
    display: block;
    /* Visible on mobile */
    background: none;
    border: none;
    color: var(--color-primary-blue);
    /* Dark icon on white header */
    font-size: 1.5rem;
    cursor: pointer;
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    /* Hidden by default */
    width: 80%;
    height: 100vh;
    background-color: var(--color-white);
    flex-direction: column;
    padding: var(--spacing-xl) var(--spacing-lg);
    transition: right var(--transition-speed) ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
}

.nav-menu.active {
    right: 0;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text-dark);
    transition: color 0.3s;
    white-space: nowrap;
    /* Prevent wrapping */
}

.nav-links a:hover {
    color: var(--color-accent-orange);
}

.nav-links a.btn {
    color: var(--color-white);
    /* Ensure button text stays white */
}

.nav-cta {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    padding-top: 7.5rem;
    padding-bottom: 7.5rem;
    /* Fallback deep red */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Increased height for overlapping effect */
    min-height: 85vh;
    left: 0;
    width: 100%;
    height: 100%;
    /* Dark Red overlay for readability */
    background-color: #165cc5;
    background-image: linear-gradient(to right, rgba(10, 35, 66, 0.9), rgba(10, 35, 66, 0)), url('Assets/automatic-gate-motor-for-gates.jpg');
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 7.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.welcome-text {
    color: #ffffff;
    /* Gold */
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 3.5rem;
    /* Larger for desktop */
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    text-transform: uppercase;
    font-weight: 800;
    color: #ffffff;
    /* Explicit white */
    text-align: left;
}

.sub-headline {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
    max-width: 700px;
    margin-left: 0;
    /* Align left */
    margin-right: auto;
    color: #ffffff;
    /* Explicit white */
    text-align: left;
}

/* Floating "Why Choose Us" Card */
.floating-wrapper {
    position: relative;
    margin-top: -125px;
    /* Overlap the hero (half-in/half-out) */
    z-index: 5;
    margin-bottom: var(--spacing-xl);
}

.floating-card {
    background-color: var(--color-white);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.75rem;
    border-radius: 4px;
}

.floating-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.floating-subtitle {
    color: var(--color-accent-orange);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: left;
}

.floating-header h2 {
    font-size: 2.2rem;
    color: #222;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    text-align: left;
}

.floating-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.feature-icon {
    background-color: #333;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.feature-icon.gold {
    background-color: #ffd700;
    color: #333;
}

.feature-text h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--color-text-dark);
}

.feature-text p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Responsive adjustments for Floating Card */
@media (max-width: 768px) {
    .floating-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .floating-features {
        grid-template-columns: 1fr;
    }

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

    .hero {
        padding-bottom: 100px;
    }

    .floating-wrapper {
        margin-top: -80px;
    }
}

/* Services Section Redesign */
.services {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.services-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-subtitle {
    color: var(--color-accent-orange);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services Grid Layout */
.services-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    max-width: 1200px;
    margin: 0 auto;
}

/* Service Item Card Styling */
.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--spacing-lg);
    transition: transform 0.3s ease;
}

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

.service-number {
    font-size: 5rem;
    font-weight: 800;
    color: #f7e8d5;
    /* Light cream/gold from screenshot */
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.service-item h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-md);
}

.service-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 300px;
    /* Limit text width for readability */
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    color: var(--color-white);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--color-accent-orange);
}

/* Contact Form (Global) */
.contact-form {
    background-color: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

.btn-block {
    display: block;
    width: 100%;
}

/* Map Container (Global) */
.map-container {
    height: 400px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Media Queries (Desktop) */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }

    /* Navbar Desktop */
    .mobile-menu-btn {
        display: none;
    }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        padding: 0;
        box-shadow: none;
        align-items: center;
        /* Helper for vertical alignment */
    }

    .nav-links {
        flex-direction: row;
        margin-bottom: 0;
        margin-right: var(--spacing-lg);
        gap: var(--spacing-lg);
        align-items: center;
        /* Ensure links correspond to center line */
    }

    .nav-cta {
        width: auto;
    }

    .nav-links a:hover {
        border-bottom: 2px solid var(--color-accent-orange);
    }

    /* Hero Desktop */
    .hero h1 {
        font-size: 3.5rem;
    }

    .sub-headline {
        font-size: 1.5rem;
    }

    /* Services Desktop */
    .services-wrapper {
        grid-template-columns: repeat(3, 1fr);
        /* 3 Columns per row */
        gap: 3rem;
        align-items: start;
    }

    /* Contact Section */
    .contact {
        padding: var(--spacing-xl) 0;
        background-color: var(--color-white);
    }

    .section-description {
        color: #666;
        font-size: 1.1rem;
        margin-bottom: var(--spacing-lg);
        line-height: 1.6;
    }

    .contact-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 3rem;
        margin-bottom: 3rem;
        margin-top: 3rem;
    }

    /* Contact Info Items */
    .info-item {
        display: flex;
        gap: 1.5rem;
        margin-bottom: 2rem;
        align-items: flex-start;
    }

    .info-icon {
        width: 50px;
        height: 50px;
        background-color: rgba(22, 92, 197, 0.1);
        color: var(--color-primary-blue);
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .info-item h4 {
        font-size: 1.1rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--color-text-dark);
    }

    .info-item p {
        color: #666;
        line-height: 1.5;
    }

    .info-item a {
        color: var(--color-primary-blue);
        font-weight: 600;
    }



    /* Desktop Layout */
    @media (min-width: 768px) {
        .contact-grid {
            grid-template-columns: 1fr 1fr;
            gap: 4rem;
        }
    }

    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }




}

/* Projects Section */
.projects {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
}

.projects-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.projects-intro {
    max-width: 700px;
    margin: 0 auto;
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.project-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Call to Action Section */
.cta-section {
    position: relative;
    background-image: url('Assets/automatic-gate-motos (2).jpg');
    /* Darker/Industrial Image */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    padding: var(--spacing-xl) 0;
    /* Consistent padding */
    color: var(--color-white);
}

.contact {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-white);
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    /* Heavy dark overlay */
}

.cta-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Left Content */
.cta-content-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.cta-label {
    color: var(--color-accent-orange);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.cta-content-left h2 {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    text-transform: uppercase;
}

.cta-content-left p {
    color: #ccc;
    font-size: 1.1rem;
    max-width: 500px;
}

/* Right Content (Card) */
.cta-card {
    background-color: rgba(255, 255, 255, 0.05);
    /* Very subtle light glass */
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 5px;
    /* Boxy look per screenshot */
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
}

.cta-icon-box {
    background-color: var(--color-accent-orange);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.cta-icon-box i {
    font-size: 1.8rem;
    color: var(--color-white);
}

.cta-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-phone {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.cta-card p {
    font-size: 0.95rem;
    color: #bbb;
    line-height: 1.6;
}

/* CTA Desktop Override */
@media (min-width: 768px) {
    .cta-container {
        flex-direction: row;
        text-align: left;
        align-items: center;
        justify-content: space-between;
    }

    .cta-content-left {
        max-width: 50%;
        margin-bottom: 0;
        align-items: flex-start;
    }

    .cta-content-right {
        max-width: 45%;
    }
}

/* Footer Section */
.footer {
    background-color: #0a254e;
    /* Dark Corporate Blue */
    color: var(--color-white);
    padding: var(--spacing-xl) 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

/* Footer Brand Column */
.footer-logo {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-brand p {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s, transform 0.3s;
    color: var(--color-white);
}

.footer-social a:hover {
    background-color: var(--color-accent-orange);
    transform: translateY(-3px);
}

/* Footer Links Columns */
.footer-col h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-white);
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent-orange);
}

.footer-links ul,
.footer-contact ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: #ccc;
    font-size: 0.95rem;
    transition: color 0.3s, padding-left 0.3s;
}

.footer-links a:hover {
    color: var(--color-accent-orange);
    padding-left: 5px;
}

/* Footer Contact Column */
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    color: #ccc;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--color-accent-orange);
    margin-top: 4px;
    /* visually align with text line */
}

/* Footer Bottom */
.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Desktop Footer Layout */
@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1.5fr;
        /* Brand wider, Links narrower */
        gap: 4rem;
    }
}

/* Testimonials Section */
.testimonials {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-light);
    text-align: center;
}

.testimonials .section-title {
    margin-bottom: var(--spacing-sm);
    font-size: 2.5rem;
    color: #222;
}

.section-subtitle-text {
    color: #666;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.testimonials-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.testimonials-slider {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0.5rem;
    width: 100%;
    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.testimonials-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Modern Testimonial Card */
.testimonial-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    min-width: 320px;
    max-width: 350px;
    /* Force card width */
    flex-shrink: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
    transition: transform 0.3s ease;
    border: 1px solid #f0f0f0;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stars {
    color: #ffc107;
    /* Gold stars */
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.testimonial-text {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-style: normal;
}

.testimonial-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.author-avatar {
    width: 40px;
    height: 40px;
    background-color: var(--color-primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.author-name {
    font-weight: 700;
    color: var(--color-text-dark);
    font-size: 0.95rem;
}

.author-role {
    font-size: 0.8rem;
    color: #999;
}

/* Navigation Buttons */
.nav-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-btn:hover {
    background-color: var(--color-primary-blue);
    color: white;
    border-color: var(--color-primary-blue);
}

@media (max-width: 768px) {
    .testimonials-slider {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .nav-btn {
        display: none;
        /* Hide buttons on mobile, rely on swipe */
    }
}