/* Estilos globales para todo el sitio */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    /* Sophisticated dark background with translucent shadows */
    background-color: #1a1a1a; /* Predominant dark base */
    background-image:
        radial-gradient(at 20% 80%, rgba(255, 0, 0, 0.05) 0px, transparent 50%), /* Subtle dark red glow bottom-left */
        radial-gradient(at 80% 20%, rgba(100, 100, 100, 0.08) 0px, transparent 50%), /* Subtle dark grey glow top-right */
        radial-gradient(at 50% 50%, rgba(0, 0, 0, 0.1) 0px, transparent 50%); /* General dark overlay */
    background-size: 100% 100%; /* Cover the entire body */
    background-attachment: fixed; /* Keep background fixed when scrolling */
}

/* Utility classes for responsive display */
.desktop-only { display: block; }
.mobile-only { display: none; }

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark, slightly transparent for blur effect */
    border-bottom: 1px solid white;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px); /* Modern browsers blur effect */
    -webkit-backdrop-filter: blur(5px); /* Safari support */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.logo img {
    height: 50px; /* Adjust as needed */
    width: auto;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover {
    color: rgb(196, 0, 0); /* Highlight color on hover */
}

.btn-quote {
    background-color: #e31500; /* Red */
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-left: 25px;
}

.btn-quote:hover {
    background-color: rgb(196, 0, 0); /* Darker red on hover */
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before, .hamburger::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background-color: #fff;
    position: absolute;
    transition: transform 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

.mobile-nav {
    display: none; /* Hidden by default */
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.98); /* Make it darker for visibility */
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    padding: 0; /* Remove padding here, add to ul/li */
    box-shadow: 0 5px 5px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Hide overflow during transition */
    max-height: 0; /* Start collapsed */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out; /* Smooth transition */
    z-index: 999; /* Ensure it's below the header but above content */
}

.mobile-nav ul {
    list-style: none;
    padding: 20px 0; /* Add padding here */
    margin: 0;
    text-align: center;
}

.mobile-nav ul li {
    margin: 15px 0;
}

.mobile-nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    padding: 10px 0;
    display: block;
}

/* Main Content Adjustment for fixed header */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 5px auto 20px auto; /* Adjust margin-top to clear fixed header */
}

/* Footer Styles */
.main-footer {
    background-color: #000;
    color: #fff;
    padding: 30px 20px;
    text-align: center;
    border-top: 1px solid white;
}

.main-footer .footer-block {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-footer .footer-block:last-of-type {
    border-bottom: none;
}

.footer-nav {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    margin: 10px 15px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #e31500;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px; /* Space between icons */
    font-size: 2em; /* Adjust icon size */
}

.social-icons a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #e31500;
}

.contact-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-info p i {
    margin-right: 10px;
    font-size: 1.2em;
}

.contact-info a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #e31500;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .mobile-only { display: block; }

    .main-nav {
        display: none; /* Hide desktop nav */
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
    }

    .header-content {
        justify-content: space-between; /* Push logo left, button/toggle right */
    }

    .btn-quote {
        margin-left: 15px; /* Adjust spacing for mobile button */
    }

    /* Mobile nav toggle */
    .main-header.open .mobile-nav {
        display: flex !important; /* Show mobile nav when open */
        max-height: 70vh; /* Sufficient height for content */
        padding: 20px 0; /* Restore padding */
        z-index: 998; /* Ensure it's below the header but above content */
    }

    .main-header.open .hamburger {
        background-color: transparent; /* Hide middle bar */
    }

    .main-header.open .hamburger::before {
        transform: translateY(8px) rotate(45deg);
    }

    .main-header.open .hamburger::after {
        transform: translateY(-8px) rotate(-45deg);
    }

    .footer-nav {
        flex-direction: column;
    }

    .footer-nav a {
        margin: 5px 0;
    }

    .contact-info p {
        flex-direction: column;
        text-align: center;
    }

    .contact-info p i {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

/* Home Slider Styles */
.home-slider-container {
    position: relative;
    width: 100%; /* Will be limited by main's max-width */
    max-width: 1200px; /* Match main content width */
    height: 400px; /* Fixed height for the slider */
    margin: 90px auto 20px auto; /* Adjust margin-top to clear fixed header */
    border-radius: 15px; /* Rounded corners for the slider */
    overflow: hidden; /* Hide parts of images outside the rounded corners */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.slider-images {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 1s ease-in-out; /* Smooth transition for images */
    border-radius: 15px; /* Ensure images also have rounded corners */
}

.slider-content {
    position: absolute;
    top: 0;
    left: 0;
    width: calc(100% - 40px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
    color: #fff; /* Text color for content */
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent overlay for readability */
    z-index: 10; /* Ensure content is above images */
    padding: 20px;
}

.slider-content h1 {
    font-size: 2em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slider-content h2 {
    font-size: 1em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

.slider-btn {
    /* Inherits .btn-quote styles */
    margin-left: 0; /* Override default margin-left from .btn-quote */
}

.slider-navigation {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 15; /* Above content and images */
}

.nav-dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5); /* Grey translucent */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.nav-dot.active {
    background-color: #fff; /* White when active */
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
    .home-slider-container {
        height: 300px; /* Smaller height on mobile */
        margin-top: 80px; /* Adjust margin for mobile header */
    }

    .slider-content h1 {
        font-size: 2em;
    }

    .slider-content h2 {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .home-slider-container {
        height: 250px;
    }

    .slider-content h1 {
        font-size: 1.5em;
    }

    .slider-content h2 {
        font-size: 1em;
    }

    .slider-btn {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}

/* Home Intro Section */
.home-intro {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    color: white;
}

.title-intro {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    color: white;
    margin-top: 50px;
}

/* Projects Interactive Section */
.projects-interactive-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
}

.section-header h2 {
    font-size: 2.2em;
    margin-bottom: 30px;
    color: #fff;
}

.tags-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.tag-button {
    background-color: #444; /* Dark grey for tags */
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px; /* Rounded corners */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-weight: bold;
    border: none;
    outline: none;
}

.tag-button:hover {
    background-color: #666;
    transform: translateY(-2px);
}

.tag-button.active {
    background-color: #e31500; /* Red when active */
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
}

.project-images-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 4 images per row, responsive */
    gap: 20px;
    margin-bottom: 30px;
}

.project-image-item {
    background-color: #333;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.project-image-item img {
    width: 100%;
    height: 180px; /* Fixed height for images */
    object-fit: cover; /* Cover the area without distortion */
    border-radius: 10px; /* Rounded corners for images */
    transition: transform 0.3s ease;
}

.project-image-item img:hover {
    transform: scale(1.05);
}

.btn-view-projects {
    background-color: #333; /* Dark grey */
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px; /* Rounded corners */
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-block; /* Allows margin auto for centering */
    margin-top: 20px;
}

.btn-view-projects:hover {
    background-color: #555;
    transform: translateY(-2px);
}

/* Testimonials Section */
.testimonials-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    border-radius: 10px;
    color: #fff;
    text-align: center;
}

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

.testimonial-card {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.client-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%; /* Circular photo */
    object-fit: cover;
    margin-right: 15px;
    border: 2px solid #e74c3c; /* Red border */
}

.client-info p {
    margin: 0;
    line-height: 1.2;
}

.client-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #fff;
}

.testimonial-date {
    font-size: 0.9em;
    color: #bbb;
}

.stars {
    color: #fff; /* White stars */
    font-size: 1.5em;
    margin-bottom: 10px;
}

.star {
    color: #fff; /* Ensure stars are white */
}

.testimonial-comment {
    font-style: italic;
    color: #ccc;
    line-height: 1.4;
    flex-grow: 1; /* Allow comment to take available space */
    font-size: 12px;
}

/* Responsive adjustments for new sections */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 1.8em;
    }

    .tags-container {
        gap: 10px;
    }

    .tag-button {
        padding: 8px 15px;
        font-size: 0.9em;
    }

    .project-images-row {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 2 images per row on smaller mobiles */
    }

    .testimonial-card {
        padding: 15px;
    }

    .client-photo {
        width: 50px;
        height: 50px;
    }

    .client-name {
        font-size: 1em;
    }

    .testimonial-date {
        font-size: 0.8em;
    }

    .stars {
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .project-images-row {
        grid-template-columns: 1fr; /* 1 image per row on very small mobiles */
    }
}
