/*
SST Profesional - Modern & Elegant Redesign
*/

/* 1. VARIABLES & RESET */
:root {
    --color-primary: #0D1B2A; /* Azul Noche */
    --color-secondary: #415A77; /* Azul Acero */
    --color-accent: #50C878; /* Verde Menta */
    --color-background: #F0F5F9; /* Gris Claro */
    --color-text-light: #E0E1DD; /* Blanco Hueso */
    --color-text-dark: #333333;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Lato', sans-serif;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --border-radius: 12px;
}

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

body {
    font-family: var(--font-secondary);
    background-color: var(--color-background);
    color: var(--color-text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 2. HEADER & NAVIGATION */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

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

.logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-primary);
    text-decoration: none;
    color: var(--color-secondary);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: var(--color-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.4s ease;
}

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

.nav-toggle {
    display: none; /* Implementación futura si es necesario */
}

/* 3. BUTTONS (3D Style) */
.btn {
    display: inline-block;
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.btn-primary {
    background-color: var(--color-secondary);
    box-shadow: 0 5px 0 #2a3a4f, 0 8px 15px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #2a3a4f, 0 10px 20px rgba(0,0,0,0.25);
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #2a3a4f, 0 2px 5px rgba(0,0,0,0.2);
}

.btn-accent {
    background-color: var(--color-accent);
    box-shadow: 0 5px 0 #368a57, 0 8px 15px rgba(0,0,0,0.2);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #368a57, 0 10px 20px rgba(0,0,0,0.25);
}

.btn-accent:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #368a57, 0 2px 5px rgba(0,0,0,0.2);
}

/* 4. HERO SECTION */
.hero {
    padding-top: 120px; /* Space for header */
    height: 60vh; /* Reduced height */
    min-height: 400px; /* Minimum height */
    max-height: 500px; /* Maximum height */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    padding: 0 1rem;
}

.hero h1 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3.5rem); /* Adjusted font size */
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.2rem); /* Adjusted font size */
    max-width: 650px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

/* 5. SERVICES PAGE & CARDS */
.page-banner {
    padding: 6rem 0 3rem; /* Reduced padding */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-light);
    text-align: center;
}

.page-banner h1 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 2.8rem); /* Adjusted font size */
}

.service-banner {
    position: relative;
    height: 50vh; /* Reduced height */
    min-height: 350px;
    max-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.7); /* Darker overlay */
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-content h1 {
    font-family: var(--font-primary);
    font-size: clamp(2rem, 4vw, 3rem);
}

.banner-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin-bottom: 2rem;
}

.banner-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.services-section {
    padding: 4rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.service-card-content {
    padding: 1.5rem;
}

.service-card h3 {
    font-family: var(--font-primary);
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.service-card p {
    margin-bottom: 1.5rem;
    color: #555;
}

.service-card .btn {
    font-size: 0.9rem;
    padding: 10px 20px;
}

/* 6. CONTACT FORM */

/* Redesign for Contact Page */
.contact-page .contact-content {
    display: flex;
    justify-content: center; /* Center the form */
    align-items: flex-start;
    padding: 2rem 0;
}

.contact-page .contact-info {
    display: none; /* Hide contact info on the dedicated contact page to focus on the form */
}

.contact-page .contact-form {
    max-width: 400px; /* Max 1/3 screen width (approx. 1280/3) */
    width: 100%;
    background: rgba(255, 255, 255, 0.95); /* Transparent background for the frame */
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.1); /* Styled frame border */
}

.contact-page .contact-section {
    padding: 6rem 0 4rem;
    position: relative;
    background-color: var(--color-primary); /* Use primary color as a fallback */
}

.contact-page .contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/images/contact-bg.jpg'); /* Transparent background image */
    background-size: cover;
    background-position: center;
    opacity: 0.1; /* Transparency */
    z-index: 1;
}

.contact-page .container {
    position: relative;
    z-index: 2;
}
.contact-section {
    padding: 4rem 0;
    position: relative;
    background-color: var(--color-primary);
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/images/contact-bg.jpg'); /* Asegúrate de tener esta imagen */
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 1;
}

.contact-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
}

.contact-form-wrapper h2 {
    font-family: var(--font-primary);
    font-size: 2rem;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 2rem;
}

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

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06), 0 0 0 3px rgba(65, 90, 119, 0.2);
}

/* 7. FOOTER */
.footer {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.footer-section a, .footer-section p {
    color: #a9b4c2;
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    font-size: 1.8rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-secondary);
    color: #a9b4c2;
}

/* Agrega aquí los estilos para las subpáginas de servicios, testimonios, etc. */


/* 8. SERVICE DETAILS PAGE */
.service-content {
    padding: 4rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.main-content {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.service-description h2 {
    font-family: var(--font-primary);
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.service-description h3 {
    font-family: var(--font-primary);
    color: var(--color-secondary);
    margin: 1.5rem 0 0.8rem;
    font-size: 1.4rem;
}

.service-description p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.service-description ul {
    margin: 1rem 0 1rem 2rem;
}

.service-description li {
    margin-bottom: 0.5rem;
}

.video-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-top: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
}

.service-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.sidebar-card h3 {
    font-family: var(--font-primary);
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.contact-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: var(--color-background);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text-dark);
    transition: background-color 0.3s ease;
}

.contact-option:hover {
    background: var(--color-secondary);
    color: white;
}

.contact-option.whatsapp:hover {
    background: #25d366;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.related-services {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-service {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--color-background);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text-dark);
    transition: transform 0.3s ease;
}

.related-service:hover {
    transform: translateX(5px);
}

.related-service img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

/* 9. CAROUSEL STYLES */
.related-services-carousel {
    padding: 4rem 0;
    background: var(--color-background);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--color-secondary);
    font-size: 1.1rem;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 2rem;
}

.carousel-slide {
    min-width: calc(33.333% - 1.33rem);
    flex-shrink: 0;
}

.carousel-service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.carousel-service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.carousel-service-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.carousel-service-content {
    padding: 1.5rem;
}

.carousel-service-content h3 {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 0.8rem;
}

.carousel-service-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.carousel-btn {
    font-size: 0.9rem;
    padding: 10px 20px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.carousel-btn-prev,
.carousel-btn-next {
    background: var(--color-secondary);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    pointer-events: all;
    box-shadow: var(--shadow-md);
}

.carousel-btn-prev:hover,
.carousel-btn-next:hover {
    background: var(--color-primary);
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.carousel-indicator.active {
    background: var(--color-secondary);
}

/* 10. CTA SECTION */
.cta-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-light);
    text-align: center;
}

.cta-content h2 {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* 11. MODAL STYLES */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-family: var(--font-primary);
    color: var(--color-primary);
    margin: 0;
}

.close {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--color-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* 12. RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .carousel-slide {
        min-width: calc(100% - 2rem);
    }
    
    .carousel-controls {
        display: none;
    }
    
    .banner-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu {
        display: none; /* Implementar menú móvil en el futuro */
    }
}

@media (max-width: 1024px) {
    .carousel-slide {
        min-width: calc(50% - 1rem);
    }
}
