:root {
    --primary-color: #841618;
    --secondary-color: #787878;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --header-offset-desktop: 160px;
    --header-offset-mobile: 100px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}

/* Hero Section */
.hero {
    background: url('../images/pacific-tower.jpg') no-repeat center center/cover;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 0 5%;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: url('../images/pacific-tower.jpg') no-repeat center center/cover;
    animation: heroZoom 20s ease-in-out infinite;
    z-index: -1;
}

@keyframes heroZoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 2.9rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    line-height: 1.2;
}

.hero-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}


h2 {
    font-size: 2rem;
    font-weight: 400;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

p {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Top Header */
.top-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.3rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001;
}

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

.social-links a {
    color: #fff;
    font-size: 1.1rem;
    margin-right: 1rem;
    transition: color 0.3s;
}

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

.contact-info {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    font-size: 0.8rem;
}

/* Estilos para enlaces de contacto */
.contact-link {
    color: #fff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: #ccc;
}

.footer-contact-link {
    color: #fff;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.footer-contact-link:hover {
    color: #ccc;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6%;
    position: fixed;
    top: 35px;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo img {
    height: 90px;
}

.desktop-menu ul {
    list-style: none;
    display: flex;
}

.desktop-menu ul li {
    margin-left: 2rem;
}

.desktop-menu ul li a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 200;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--dark-color);
    transition: color 0.3s;
    text-transform: uppercase;
}

.desktop-menu ul li a:hover {
    color: var(--primary-color);
}

/* Hamburger & Close Menu */
.hamburger-menu, .close-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-color);
    transition: transform 0.3s;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -95%;
    width: 95%;
    height: 100vh;
    background-color: #fff;
    padding: 2rem 5%;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    transition: right 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    display: flex;
    flex-direction: column;
}

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

.close-menu {
    position: absolute;
    top: 1.5rem;
    right: 5%;
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin-top: 2rem;
}

.mobile-menu ul li {
    margin: 1.5rem 0;
}

.mobile-menu ul li a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 200;
    letter-spacing: 1px;
    color: var(--primary-color);
    display: block;
    text-transform: uppercase;
}

/* Sections */
.section, .services-section, .benefits-section, .team-section, .contact-section {
    padding: 0;
}

/* Offset de anclaje para header fijo */
section[id] {
    scroll-margin-top: var(--header-offset-desktop);
}

/* New container for content to add padding and max-width */
.section-container {
    padding: 5% 5%;
    max-width: 1200px;
    margin: auto;
}

/* Quienes Somos */
.content-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

/* Servicios Section */
.services-section {
    background-color: var(--primary-color);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Patrón de diagonales para servicios */
.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.08) 2px,
            rgba(255,255,255,0.08) 4px
        ),
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 2px,
            rgba(255,255,255,0.05) 2px,
            rgba(255,255,255,0.05) 4px
        );
    z-index: 1;
}

.services-section .section-container {
    position: relative;
    z-index: 2;
}

.services-section h2, .services-section p, .services-section h3 {
    color: #fff;
}

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

.service-item {
    background-color: transparent;
    padding: 0;
    text-align: center;
    transition: transform 0.3s;
}

.service-item img {
    width: 60%;
    height: auto;
    object-fit: cover;
    display: block;
    margin: 0 auto 1rem auto;
}

.service-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.service-item p {
    color: rgba(255, 255, 255, 0.8);
}

/* Diferenciadores Section */
.differentiators-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.differentiator-item {
    background-color: var(--light-color);
    padding: 2rem;
    text-align: center;
}

.differentiator-item .number {
    font-size: 4rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
}

.differentiator-item h3 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Beneficios Section */
.benefits-section {
    background-color: var(--primary-color);
    color: #fff;
}

.benefits-section h2 {
    color: #fff;
}

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

.benefit-item {
    background-color: transparent;
    padding: 2rem;
    text-align: center;
}

.benefit-item i {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-item p {
    font-weight: 600;
    color: #fff;
}

/* Equipo Section */
.team-section {
    background-color: var(--light-color);
}

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

.team-member {
    position: relative;
    overflow: hidden;
    height: 350px;
}

.team-member img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s;
}

.team-member:hover img {
    transform: scale(1.05);
}

.member-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 1rem;
    text-align: center;
    transition: background-color 0.5s;
}

.member-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.member-info p {
    font-size: 0.9rem;
    color: #fff;
}

.member-info a {
    color: #fff;
    font-size: 1.5rem;
    margin-top: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.member-info a:hover {
    opacity: 1;
}

/* Contacto Section */
.contact-section {
    background: url('https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?q=80&w=1738&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center/cover;
    position: relative;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0);
}

.contact-section .section-container {
    position: relative;
    z-index: 2;
}

.contact-container {
    display: flex;
    justify-content: flex-start;
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    padding: 2rem;
}

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

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

input, textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--secondary-color);
    background-color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

button[type="submit"] {
    background-color: var(--primary-color);
    color: #fff;
    padding: 1rem;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    transition: background-color 0.3s;
}

button[type="submit"]:hover {
    background-color: var(--secondary-color);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: #fff;
    padding: 3rem 5% 0;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-left {
    justify-content: flex-start;
}

.footer-center {
    justify-content: center;
    text-align: center;
}

.footer-right {
    justify-content: flex-end;
}

.footer-logo img {
    height: 90px;
    margin-bottom: 1rem;
}

.footer-contact-info p {
    color: #fff;
    margin-bottom: 0.5rem;
}

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

.footer-social-media a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.footer-social-media a:hover {
    color: var(--primary-color);
}

/* Subfooter */
.subfooter {
    
    padding: 1rem 5%;
    text-align: center;
    margin-top: 2rem;
}

.subfooter p {
    font-size: 0.8rem;
    color: #ccc;
    margin: 0.5rem 0;
}

.subfooter a {
    color: #ccc;
    transition: color 0.3s;
}

.subfooter a:hover {
    color: #fff;
}

/* Horizontal line between sections */
hr {
    border: 0;
    height: 1px;
    background-color: var(--secondary-color);
    margin: 3rem 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive Design */
@media (min-width: 768px) {
    .content-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 1rem;
    }
    .differentiators-grid {
        grid-template-columns: 1fr 1fr;
    }
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767px) {
    /* Ocultar top-header en móviles */
    .top-header {
        display: none;
    }
    
    .desktop-menu {
        display: none;
    }
    .hamburger-menu {
        display: block;
    }
    section[id] {
        scroll-margin-top: var(--header-offset-mobile);
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    h2 {
        font-size: 1.8rem;
    }
    .contact-container {
        grid-template-columns: 1fr;
    }
    .differentiators-grid {
        grid-template-columns: 1fr;
    }
    
    /* Más margen en secciones para responsive */
    .section-container {
        padding: 15% 5%;
    }
    
    .services-section .section-container {
        padding: 15% 5%;
    }
    
    .benefits-section .section-container {
        padding: 15% 5%;
    }
    
    .team-section .section-container {
        padding: 15% 5%;
    }
    
    .contact-section .section-container {
        padding: 15% 5%;
    }
    
    /* Footer responsive para móviles */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-column {
        align-items: center;
    }
    
    .footer-social-media {
        justify-content: center;
    }
    
    /* Header principal en móviles */
    header {
        top: 0;
        padding: 1rem 5%;
        justify-content: space-between;
    }
    
    /* Centrar logo verticalmente */
    header .logo {
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    
    header .logo img {
        height: 70px;
    }
    
    /* Hamburger menu pegado a la derecha */
    .hamburger-menu {
        display: block;
        position: absolute;
        right: 5%;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Estilos para mensajes del formulario */
.form-messages {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-icon {
    font-size: 1.2rem;
    font-weight: bold;
}

.message-text {
    flex: 1;
}

.error-list {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.error-list li {
    margin-bottom: 0.25rem;
}

/* Animación para mensajes */
.form-messages {
    animation: slideIn 0.3s ease-out;
}

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

/* Estilos para botón de envío cuando está deshabilitado */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #6c757d;
}

button[type="submit"]:disabled:hover {
    background-color: #6c757d;
    transform: none;
}