/* Colores principales - ¡Nueva Paleta: Azul, Verde y Naranja Vibrantes! */
:root {
    --color-principal: #2A4D69; /* Azul petróleo profundo. Base elegante. */
    --color-acento-1: #4CAF50; /* Verde brillante. Para destacar principal. */
    --color-acento-2: #FF9800; /* Naranja cálido. Para destacar secundario/hover. */
    --color-secundario: #F8F8F8; /* Gris muy claro, casi blanco. Fondo amplio. */
    --color-texto-oscuro: #333333; /* Gris oscuro para el texto principal */
    --color-texto-claro: #fff; /* Blanco puro */
    --color-acento-sutil: #BBBBBB; /* Gris medio para detalles */
    --color-sombra: rgba(0, 0, 0, 0.15); /* Sombra un poco más pronunciada */
}

/* Estilos Generales */
html {
    scroll-behavior: smooth; /* Desplazamiento suave al hacer clic en enlaces de anclaje */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-secundario); /* Gris claro como fondo principal */
    color: var(--color-texto-oscuro);
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Marca de Agua de Fondo */
/* Asegúrate de tener una imagen en la ruta 'img/logo.png' si quieres que esto funcione. */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/logo.png'); /* **¡Verifica esta ruta!** */
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 650px; /* Ajusta el tamaño de la marca de agua */
    opacity: 0.04;
    pointer-events: none;
    z-index: -1;
}

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

/* Utilidad para centrar contenido */
.text-center {
    text-align: center;
}

/* Encabezado (Header) */
header {
    background-color: var(--color-principal); /* Azul petróleo oscuro */
    color: var(--color-texto-claro);
    padding: 20px 0;
    box-shadow: 0 5px 15px var(--color-sombra);
    position: sticky; /* Menú fijo al hacer scroll */
    top: 0;
    z-index: 10;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 2.8em;
    font-weight: 700;
    letter-spacing: 1px;
}

header h1 span {
    color: var(--color-acento-1); /* Verde para el "CT" */
    border: 2px solid var(--color-acento-1);
    padding: 2px 10px;
    border-radius: 5px;
    margin-left: 8px;
    transition: all 0.3s ease;
}

header h1:hover span {
    background-color: var(--color-acento-1);
    color: var(--color-texto-claro);
}


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

nav ul li {
    margin-left: 35px;
}

nav ul li a {
    color: var(--color-texto-claro);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.15em;
    padding-bottom: 7px;
    position: relative;
    transition: all 0.3s ease-in-out;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 4px;
    background-color: var(--color-acento-2); /* Naranja para el hover */
    left: 0;
    bottom: 0;
    transition: width 0.3s ease-in-out;
}

nav ul li a:hover {
    color: var(--color-acento-2); /* Texto del enlace cambia a naranja */
}
nav ul li a:hover::after {
    width: 100%;
}

/* Botón Primario Global */
.btn-primary {
    background-color: var(--color-acento-1); /* Botón con el verde vibrante */
    color: var(--color-texto-claro);
    padding: 20px 45px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.4em;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px var(--color-sombra);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--color-acento-2); /* Naranja para el hover del botón */
    transform: translateY(-7px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.3);
}

/* Botón Secundario (para Proyectos y Cursos) */
.btn-secondary {
    display: inline-block;
    background-color: var(--color-acento-2); /* Naranja vibrante para el botón */
    color: var(--color-texto-claro);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border: none;
}

.btn-secondary:hover {
    background-color: var(--color-acento-1); /* Verde al hacer hover */
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.2);
}
.btn-secondary i {
    margin-left: 10px;
}


/* Sección Héroe (Hero Section) */
.hero {
    background: linear-gradient(135deg, var(--color-principal), #4A7080); /* Degradado de azules/verdes oscuros */
    color: var(--color-texto-claro);
    text-align: center;
    padding: 130px 20px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 4.5em;
    margin-bottom: 25px;
    font-weight: 800;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.4);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.8em;
    margin-bottom: 60px;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 300;
}

/* Secciones Generales */
.services, .stats, .products, .benefits, .contact, .about, .portfolio, .courses {
    padding: 90px 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.services h2, .stats h2, .products h2, .benefits h2, .contact h2, .about h2, .portfolio h2, .courses h2 {
    font-size: 3.5em;
    margin-bottom: 70px;
    color: var(--color-principal); /* Azul petróleo oscuro */
    position: relative;
    display: inline-block;
    font-weight: 700;
}

/* Línea debajo de los títulos de sección - Estilo global */
.services h2::after, .stats h2::after, .products h2::after, .benefits h2::after, .contact h2::after, .about h2::after, .courses h2::after, .portfolio h2::after {
    content: '';
    position: absolute;
    width: 120px;
    height: 6px;
    background-color: var(--color-acento-1); /* Línea con verde vibrante por defecto */
    left: 50%;
    transform: translateX(-50%);
    bottom: -20px;
    border-radius: 3px;
}

/* Ajuste específico para la línea de Portafolio (Usaremos Naranja para diferenciar) */
.portfolio h2::after {
    background-color: var(--color-acento-2); 
}

/* Sección de Servicios */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 45px;
    margin-top: 40px;
}

.service-item {
    background-color: var(--color-texto-claro);
    padding: 45px;
    border-radius: 15px;
    box-shadow: 0 10px 25px var(--color-sombra);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 6px solid var(--color-acento-1); /* Borde inferior con verde vibrante */
}

.service-item:hover {
    transform: translateY(-20px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.service-item .icon {
    font-size: 4.5em;
    color: var(--color-acento-1); /* Íconos con verde vibrante */
    margin-bottom: 30px;
    animation: bounceIn 0.8s forwards;
}

.service-item h3 {
    font-size: 2.2em;
    margin-bottom: 18px;
    color: var(--color-principal);
    font-weight: 700;
}

.service-item p {
    font-size: 1.2em;
    color: #666;
}

/* Sección de Estadísticas */
.stats {
    background-color: var(--color-principal); /* Fondo azul petróleo oscuro */
    color: var(--color-texto-claro);
    padding: 110px 0;
}

.stats h2 {
    color: var(--color-texto-claro);
}

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

.stat-item {
    background-color: var(--color-texto-claro);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 6px 15px var(--color-sombra);
    transition: transform 0.3s ease;
    border-left: 6px solid var(--color-acento-1); /* Borde izquierdo con verde vibrante */
}

.stat-item:hover {
    transform: scale(1.05);
}

.stat-item .icon {
    font-size: 4em;
    color: var(--color-principal); /* Íconos con azul petróleo */
    margin-bottom: 20px;
}

.stat-item .number {
    font-size: 4.5em;
    font-weight: bold;
    color: var(--color-acento-2); /* Números con naranja vibrante */
    margin-bottom: 10px;
}

.stat-item .text {
    font-size: 1.5em;
    font-weight: 500;
    color: var(--color-texto-oscuro);
}

/* Sección de Portafolio (Proyectos) */
.portfolio {
    padding: 100px 0;
    background-color: var(--color-secundario); /* Fondo gris claro */
}

.portfolio .section-description {
    font-size: 1.4em;
    color: var(--color-texto-oscuro);
    max-width: 900px;
    margin: -50px auto 60px;
}

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

.project-item {
    background-color: var(--color-texto-claro); 
    border-radius: 15px;
    box-shadow: 0 10px 25px var(--color-sombra);
    overflow: hidden; 
    text-align: left;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    border-top: 8px solid var(--color-acento-1); /* Borde superior con verde vibrante */
}

.project-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.project-image {
    width: 100%;
    height: 250px; 
    background-color: var(--color-principal); 
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    color: var(--color-texto-claro);
    font-weight: 600;
    /* Colores y fondos de ejemplo para simular imágenes */
    background-size: cover;
    background-position: center;
}
/* Placeholder de Imágenes (simuladas) para Proyectos */
.project-item:nth-child(1) .project-image { 
    background-image: url('https://via.placeholder.com/600x400/2A4D69/FFFFFF?text=Moda+Vanguardia'); 
}
.project-item:nth-child(2) .project-image { 
    background-image: url('https://via.placeholder.com/600x400/4A7080/FFFFFF?text=EduSys+Pro'); 
}
.project-item:nth-child(3) .project-image { 
    background-image: url('https://via.placeholder.com/600x400/FF9800/FFFFFF?text=Soluciones+MX'); 
}


.project-info {
    padding: 30px;
}

.project-info h3 {
    font-size: 2.2em;
    color: var(--color-principal);
    margin-bottom: 15px;
    font-weight: 700;
}

.project-description {
    font-size: 1.2em;
    color: #555;
    margin-bottom: 25px;
}

.project-details {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.project-details li {
    font-size: 1.1em;
    color: var(--color-texto-oscuro);
    margin-bottom: 8px;
    border-left: 3px solid var(--color-acento-sutil);
    padding-left: 10px;
}

.project-details li strong {
    color: var(--color-principal);
}


/* Sección de Productos (Placeholder) */
.products {
    padding: 90px 0;
    background-color: var(--color-secundario); /* Fondo gris claro */
}

.products p {
    font-size: 1.4em;
    color: var(--color-texto-oscuro);
    max-width: 900px;
    margin: 0 auto;
}

/* Sección de Beneficios */
.benefits {
    background-color: var(--color-texto-claro); /* Fondo blanco */
    padding: 90px 0;
}

.benefits h2 {
    color: var(--color-principal);
}

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

.benefit-item {
    background-color: var(--color-secundario); /* Fondo gris claro */
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 6px 18px var(--color-sombra);
    text-align: left;
    transition: all 0.3s ease;
    border-left: 5px solid var(--color-acento-1); /* Borde lateral con verde vibrante */
}

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

.benefit-item .icon {
    font-size: 3em;
    color: var(--color-acento-1); /* Íconos con verde vibrante */
    margin-bottom: 18px;
    display: block;
}

.benefit-item h3 {
    font-size: 2em;
    color: var(--color-principal);
    margin-bottom: 12px;
    font-weight: 600;
}

.benefit-item p {
    font-size: 1.15em;
    color: #555;
}


/* Sección Quiénes Somos */
.about {
    background-color: var(--color-principal); /* Fondo azul petróleo oscuro */
    color: var(--color-texto-claro);
    padding: 90px 0;
}

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

.about p {
    font-size: 1.4em;
    max-width: 1000px;
    margin: 0 auto 30px;
    color: var(--color-acento-sutil);
}

/* Sección de Cursos */
.courses {
    padding: 90px 0;
    text-align: center;
    background-color: var(--color-texto-claro); /* Fondo blanco */
}

.courses h2 {
    color: var(--color-principal);
}

.courses h2::after {
    background-color: var(--color-acento-1); /* Línea con verde vibrante */
}

.courses .section-description {
    font-size: 1.4em;
    color: var(--color-texto-oscuro);
    max-width: 900px;
    margin: 0 auto 60px; 
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px; 
    margin-top: 40px;
}

.course-item {
    background-color: var(--color-secundario); /* Fondo gris claro */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 25px var(--color-sombra);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 6px solid var(--color-acento-2); /* Borde inferior con naranja vibrante */
}

.course-item:hover {
    background-color: #fff;
    transform: translateY(-15px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.course-item .icon {
    font-size: 4em;
    color: var(--color-principal); /* Azul petróleo para íconos */
    margin-bottom: 25px;
}

.course-item h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--color-principal);
    font-weight: 700;
}

.course-item p {
    font-size: 1.15em;
    color: #666;
    margin-bottom: 25px;
}


/* Sección de Contacto */
.contact {
    padding: 90px 0;
    background-color: var(--color-secundario); /* Fondo gris claro */
}

.contact h2 {
    color: var(--color-principal);
}

.contact-content-wrapper {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 40px; 
    margin-top: 50px;
}

.contact-info {
    flex: 1 1 350px; 
    max-width: 450px; 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
}

.contact-item {
    background-color: var(--color-texto-claro);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--color-sombra);
    text-align: center;
    flex: 1 1 300px;
    max-width: 400px;
    transition: transform 0.3s ease;
    border-bottom: 5px solid var(--color-acento-1); /* Borde inferior con verde vibrante */
}

.contact-item:hover {
    transform: translateY(-10px);
}

.contact-item .icon {
    font-size: 3.5em;
    color: var(--color-acento-1); /* Íconos con verde vibrante */
    margin-bottom: 20px;
}

.contact-item h3 {
    font-size: 2em;
    margin-bottom: 15px;
    color: var(--color-principal);
}

.contact-item p, .contact-item a {
    font-size: 1.25em;
    color: #666;
    text-decoration: none;
    display: block;
}

.contact-item a:hover {
    color: var(--color-acento-2); /* Enlaces con naranja al hover */
}

/* Estilos del Formulario de Contacto */
.contact-form {
    background-color: var(--color-texto-claro); /* Fondo blanco */
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--color-sombra);
    flex: 1 1 500px; 
    max-width: 600px; 
    text-align: left; 
    border-top: 5px solid var(--color-acento-1); /* Borde superior con el verde vibrante */
}

.contact-form h3 {
    font-size: 2.2em;
    color: var(--color-principal); 
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 1.1em;
    color: var(--color-texto-oscuro);
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group textarea {
    width: calc(100% - 22px); /* Ajuste para padding */
    padding: 12px 10px;
    border: 1px solid var(--color-acento-sutil); 
    border-radius: 8px;
    font-size: 1em;
    color: var(--color-texto-oscuro);
    background-color: var(--color-secundario); 
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-acento-1); 
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2); 
    outline: none;
}

.form-group textarea {
    resize: vertical; 
    min-height: 120px;
}

.contact-form .btn-primary {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.3em;
    border-radius: 10px; 
    margin-top: 20px;
}

/* Pie de Página (Footer) */
footer {
    background-color: var(--color-principal); /* Azul petróleo oscuro */
    color: var(--color-texto-claro);
    text-align: center;
    padding: 45px 0;
    margin-top: 70px;
    box-shadow: 0 -5px 15px var(--color-sombra);
    position: relative;
    z-index: 10;
}

footer p {
    margin: 0;
    font-size: 1.15em;
    font-weight: 300;
}

/* -------------------------------------- */
/* Responsive Design */
/* -------------------------------------- */
@media (max-width: 992px) {
    .hero h2 {
        font-size: 3.5em;
    }
    .hero p {
        font-size: 1.4em;
    }
    .services h2, .stats h2, .products h2, .benefits h2, .contact h2, .about h2, .portfolio h2, .courses h2 {
        font-size: 2.8em;
        margin-bottom: 50px;
    }
    body::before {
        background-size: 500px;
    }
    .project-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    .contact-content-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .contact-info, .contact-form {
        max-width: 90%; 
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    header nav ul {
        margin-top: 25px;
        flex-wrap: wrap;
        justify-content: center;
    }

    header nav ul li {
        margin: 0 15px 15px;
    }

    .hero {
        padding: 100px 20px;
    }
    .hero h2 {
        font-size: 2.8em;
    }
    .hero p {
        font-size: 1.2em;
    }
    .hero .btn-primary {
        padding: 15px 30px;
        font-size: 1.2em;
    }

    .services, .stats, .products, .benefits, .contact, .about, .portfolio, .courses {
        padding: 60px 0;
    }
    .services h2, .stats h2, .products h2, .benefits h2, .contact h2, .about h2, .portfolio h2, .courses h2 {
        font-size: 2.2em;
        margin-bottom: 40px;
    }
    .service-grid, .stats-grid, .benefits-grid, .project-grid, .course-grid {
        grid-template-columns: 1fr;
    }
    .service-item, .stat-item, .benefit-item, .contact-item, .project-item, .course-item {
        padding: 30px;
        margin: 0 15px;
    }
    
    .project-item {
        margin: 20px auto; 
        max-width: 450px;
    }
    
    .project-image {
        height: 200px; 
    }

    .contact-form {
        padding: 30px;
    }
    .contact-form h3 {
        font-size: 1.8em;
    }
    body::before {
        background-size: 350px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.1);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

.hero h2, .hero p, .hero .btn-primary {
    animation: fadeIn 1.5s ease-out forwards;
}
