:root {
    --color-primary-red: #E60012;
    --color-primary-yellow: #FFC107;
    --color-dark: #000000;
    --color-dark-alt: #111111;
    --color-light: #FFFFFF;
    --color-gray: #F5F5F5;
    --color-text: #333333;
    
    --font-main: 'Montserrat', sans-serif;
}

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

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

/* Typography Helpers */
.highlight {
    color: var(--color-primary-yellow);
}
.highlight-red {
    color: var(--color-primary-red);
}

/* Header */
.header {
    background-color: var(--color-dark);
    position: relative;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary-red);
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    border-radius: 4px; /* para que el destello no se salga de esquinas si las hay */
}

/* Efecto de destello sutil para la última letra del logo */
.logo::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 85%; /* Empieza casi al final (cerca de la última letra 'A') */
    width: 8%; /* Muy estrecho, para que solo afecte a esa zona */
    height: 80%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-20deg);
    animation: subtleLastLetterGlow 10s infinite ease-in-out;
    pointer-events: none;
    opacity: 0;
}

@keyframes subtleLastLetterGlow {
    0%, 80% { left: 85%; opacity: 0; }
    85% { opacity: 1; }
    90% { left: 98%; opacity: 0; } /* Se desliza lenta y suavemente hacia el borde derecho */
    100% { left: 98%; opacity: 0; }
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    text-decoration: none;
    color: var(--color-light);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s;
}

.nav a:hover, .nav a.active {
    color: var(--color-primary-yellow);
}

.phone-cta {
    background-color: var(--color-primary-yellow);
    color: var(--color-dark);
    height: 60px;
    margin-left: 20px;
    padding: 0 30px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.header-line {
    display: flex;
    height: 6px;
    width: 100%;
}

.line-red {
    background-color: var(--color-primary-red);
    width: 15%;
    clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
}

.line-yellow {
    background-color: var(--color-primary-yellow);
    width: 85%;
    margin-left: -2%;
    clip-path: polygon(2% 0, 100% 0, 100% 100%, 0 100%);
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    color: var(--color-light);
    padding: 0 5%;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('assets/img/hero_main.jpg');
    background-size: cover;
    background-position: center;
    filter: brightness(0.6) contrast(0.85);
    z-index: -2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    margin-left: 2vw;
}

.hero h1 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 40px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    border: 2px solid transparent;
    border-radius: 30px;
}

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

.btn-primary:hover {
    background-color: #e5ad06;
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-light);
    border-color: var(--color-light);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Features Bar */
.features-bar {
    background-color: var(--color-dark-alt);
    color: var(--color-light);
    display: flex;
    justify-content: center;
    padding: 40px 0;
    flex-wrap: wrap;
    gap: 40px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    max-width: 300px;
}

.feature-icon {
    color: var(--color-primary-yellow);
}

.feature-text h3 {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--color-light);
}

.feature-text p {
    font-size: 12px;
    color: #aaaaaa;
    line-height: 1.4;
}

/* About Section */
.about-section {
    display: flex;
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 40px;
    gap: 60px;
}

.about-content {
    flex: 1;
    max-width: 400px;
}

.section-subtitle {
    color: var(--color-primary-red);
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 15px;
}

.section-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--color-dark);
}

.section-desc {
    font-size: 15px;
    color: #666;
    margin-bottom: 30px;
}

.btn-outline-dark {
    border-color: var(--color-dark);
    color: var(--color-dark);
    padding: 10px 20px;
}

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

.about-grid {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.service-card {
    position: relative;
    overflow: hidden;
    background-color: #333;
    color: var(--color-light);
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    min-height: 200px;
}

.card-img {
    display: block;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
    filter: grayscale(100%) brightness(30%);
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.service-card:hover .card-img {
    filter: grayscale(0%) brightness(50%);
    transform: scale(1.05);
}

.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 40px 20px 20px 20px;
    gap: 15px;
    flex-grow: 1;
    justify-content: flex-start;
    align-items: center;
}

.card-icon {
    color: var(--color-light);
    background: var(--color-primary-red);
    padding: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.card-icon svg {
    width: 48px;
    height: 48px;
}

.card-text h4 {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 10px;
    color: #fff;
}

.card-text p {
    font-size: 14px;
    color: #eee;
    line-height: 1.4;
}

/* Projects Section */
.projects-section {
    padding: 80px 0;
    background-color: var(--color-light);
}

.projects-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
    gap: 20px;
}

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

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        grid-auto-flow: dense;
    }
    .item-large {
        grid-column: span 2;
        grid-row: span 2;
    }
    .item-horizontal {
        grid-column: span 2;
        grid-row: span 1;
    }
    .item-vertical {
        grid-column: span 1;
        grid-row: span 2;
    }
}

.gallery-item {
    background-size: 135%;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: #eee;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(230, 0, 18, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay span {
    color: var(--color-light);
    font-weight: 800;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

/* Bottom CTA */
.bottom-cta {
    background-color: var(--color-primary-red);
    padding: 25px 0;
}

.cta-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-text {
    display: flex;
    align-items: center;
    color: var(--color-light);
}

.cta-text h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 5px;
}

.cta-text p {
    font-size: 14px;
    font-weight: 500;
}

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

.btn-white:hover {
    background-color: #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .about-section {
        flex-direction: column;
    }
    .about-content {
        max-width: 100%;
        text-align: center;
    }
}

@media (max-width: 900px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    .phone-cta {
        padding: 10px 20px;
        width: 100%;
        justify-content: center;
    }
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .hero {
        height: auto;
        padding: 60px 20px;
        text-align: center;
    }
    .hero-content {
        margin-left: 0;
    }
    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    .hero h1 {
        font-size: 32px;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .cta-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    .cta-text {
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .logo img {
        height: 50px !important;
    }
    .hero h1 {
        font-size: 26px;
    }
    .hero p {
        font-size: 15px;
    }
    .certifications {
        flex-direction: column !important;
        gap: 25px !important;
    }
    .header-container > div:last-child {
        width: 100%;
        justify-content: center;
    }
    .phone-cta span {
        font-size: 20px !important;
    }
    .section-title {
        font-size: 26px;
    }
}

.social-link { 
    color: #fff; 
    transition: all 0.3s ease; 
    display: inline-block; 
    background-color: rgba(255,255,255,0.05); 
    padding: 12px; 
    border-radius: 50%; 
    border: 1px solid rgba(255,255,255,0.1);
}
.social-link:hover { 
    background-color: var(--color-primary-yellow); 
    color: var(--color-dark); 
    border-color: var(--color-primary-yellow);
    transform: translateY(-3px); 
}
.social-link svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Gallery Filter Buttons */
.filter-btn {
    background-color: transparent;
    color: var(--color-dark);
    border: 2px solid var(--color-dark);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}
.filter-btn:hover, .filter-btn.active {
    background-color: var(--color-dark);
    color: var(--color-light);
}

/* Old Mini Spray code left from earlier, we will just keep it so it doesn't break anything, though new spray is inline via HTML */
.spray-icon-old { position: relative; width: 60px; height: 50px; margin-right: 20px; }
