@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --color-navy: #003b73;
    --color-navy-light: #004a8f;
    --color-orange: #f58220;
    --color-orange-gradient: linear-gradient(135deg, #f58220 0%, #ff9d47 50%, #f58220 100%);
    --color-white: #ffffff;
    --color-grey: #f4f7f9;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-orange: 0 10px 30px rgba(245, 130, 32, 0.3);
}

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

html,
body {
    font-family: 'Outfit', sans-serif;
    color: var(--color-navy);
    background: var(--color-grey);
    line-height: 1.6;
    overflow-x: hidden;
    /* Critical for mobile menu */
    max-width: 100%;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-gold {
    background: var(--color-orange-gradient);
    color: white;
    box-shadow: var(--shadow-orange);
}

.btn-gold:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(245, 130, 32, 0.5);
}

.btn-green {
    background: #25D366;
    color: white;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

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

/* --- Header --- */
.top-bar {
    background: var(--color-navy);
    color: var(--color-orange);
    padding: 10px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
}

.main-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px; /* Reduced to match the smaller logo */
}

.logo {
    display: block;
    height: 70px; /* Reduced from 100px */
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

.desktop-nav a {
    margin-left: 30px;
    font-weight: 600;
    color: var(--color-navy);
    position: relative;
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-orange);
    transition: 0.3s;
}

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

/* --- Hero Section --- */
.hero {
    background: linear-gradient(to right, rgba(0, 59, 115, 0.85), rgba(0, 59, 115, 0.5)), url('assets/images/hero_estepona_v2.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: var(--color-orange-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.9;
}

/* --- Services --- */
.services {
    padding: 80px 0;
    text-align: center;
}

.services h2,
.about h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--color-navy);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    transition: 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--color-orange-gradient);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
}

/* --- About --- */
.about {
    background: var(--color-navy-light);
    color: white;
    padding: 80px 0;
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
}

.about h2 {
    color: var(--color-orange);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
}

/* --- Footer --- */
footer {
    background: #020b0f;
    color: #888;
    text-align: center;
    padding: 50px 0 100px 0;
    /* Extra padding for sticky bar */
    font-size: 0.9rem;
}

/* --- Mobile Sticky Actions --- */
.sticky-actions {
    display: none; /* Hidden on Desktop */
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px; /* Space for the sticky bar */
    }
    .sticky-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        display: flex;
        z-index: 99999;
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    }

    .sticky-btn {
        flex: 1;
        padding: 18px;
        text-align: center;
        color: white;
        font-weight: 800;
        text-transform: uppercase;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .sticky-btn.call {
        background: var(--color-orange-gradient);
        color: white;
    }

    .sticky-btn.whatsapp {
        background: #25D366;
    }
}


@media (max-width: 768px) {
    .hero {
        padding: 80px 0 120px 0;
        clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
    }

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

    .desktop-nav {
        display: none;
    }


    .brand-name {
        font-size: 1.3rem;
        /* Smaller on mobile */
    }
    .brand-location {
        font-size: 0.8rem;
    }
    .logo-shield {
        height: 50px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .main-header .container {
        flex-wrap: nowrap; /* Force logo and menu on the same line */
    }

    .logo {
        height: 55px; /* Even smaller on mobile */
    }

    .mobile-toggle {
        display: block;
    }

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

    .jobs-grid,
    .reviews-grid {
        /* Added .jobs-grid here just in case, though it is used in gallery */
        grid-template-columns: 1fr;
    }
}

/* Pagination Styles */
.job-card {
    display: none;
    /* Hidden by default */
}

.job-card.active-page {
    display: block;
    /* Shown if active */
}

.pagination-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: var(--color-navy);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--color-orange);
    color: #fff;
    border-color: var(--color-orange);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Gallery Grid Layout --- */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.jobs-grid img {
    aspect-ratio: 3/4;
    object-fit: cover;
    width: 100%;
}


/* --- Mobile Navigation (Global Definition) --- */
.mobile-toggle {
    display: none;
    /* Hidden on Desktop */
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-navy);
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out, visibility 0.3s;
    visibility: hidden;
    /* Prevent horizontal scroll */
}

.mobile-menu.active {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-navy);
    text-transform: uppercase;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 3rem;
    cursor: pointer;
    color: var(--color-navy);
}

@media (max-width: 768px) {
    .jobs-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 columns on mobile */
        gap: 15px;
    }

    .mobile-toggle {
        display: block;
        /* Show Hamburger on Mobile */
    }
}
/* --- Trust Bar --- */
.trust-bar {
    background: #fff;
    padding: 25px 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
    z-index: 100;
    margin: -30px 20px 40px 20px;
    border-radius: 12px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid #f0f0f0;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    text-align: center;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.trust-item .icon {
    font-size: 2rem;
}

.trust-item span {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--color-navy);
}

.trust-item p {
    font-size: 0.7rem;
    color: #888;
    margin: 0;
}

/* --- Brand Logos Section --- */
.brands-section {
    padding: 20px 0;
    background: #fff;
    text-align: center;
}

.brands-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    opacity: 0.4;
    filter: grayscale(1);
    margin-top: 15px;
}

.brand-item {
    font-weight: 800;
    font-size: 1.2rem;
    color: #999;
}

@media (max-width: 768px) {
    .trust-bar {
        margin: -20px 10px 30px 10px;
        padding: 15px 5px;
    }
    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}
