/* styles.css - Estilos principales para el sitio web */

/* Variables de colores */
:root {
    --primary-color: #2e7d32; /* Verde */
    --secondary-color: #1b5e20; /* Verde oscuro */
    --accent-color: #4caf50; /* Verde claro */
    --dark-color: #212121; /* Negro */
    --gray-color: #757575; /* Gris oscuro */
    --light-gray: #f5f5f5; /* Gris claro */
    --white-color: #ffffff; /* Blanco */
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--white-color);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-full {
    width: 100%;
}

/* Clases para animaciones */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Delay para animaciones */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* Header y Navegación */
header {
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 5px 0;
    background-color: rgba(255, 255, 255, 0.95);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 120px;
    margin-right: 20px;
}
/* Ajuste para el logo en dispositivos móviles */
@media (max-width: 768px) {
    .logo img {
        height: 70px; /* Un poco más pequeño en móviles pero aún más grande que el original */
    }
    
    /* Ajustar el texto del logo para dispositivos móviles */
    .logo h1 {
        font-size: 1rem;
    }
}
/* Añadir logo al footer */
.footer-logo {
    flex: 1;
    min-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo img {
    height: 200px;
    margin-bottom: 15px;
}

.footer-logo h3 {
    color: var(--white-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.logo h1 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    color: var(--dark-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a:focus::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px auto;
    transition: var(--transition);
    display: block;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center; 
    text-align: center;
    color: var(--white-color);
    margin-top: 0;
    position: relative;
    overflow: hidden;
    padding-top: 120px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.7), rgba(27, 94, 32, 0.7));
    opacity: 0.8;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Profile Section */
.profile {
    padding: 100px 0;
    background-color: var(--light-gray);
    position: relative;
}

.profile-content {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.profile-image {
    flex: 1;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.profile-image img {
    border-radius: 8px;
    transition: transform 0.5s ease;
    display: block;
    width: 100%;
}

.profile-image:hover img {
    transform: scale(1.05);
}

.profile-info {
    flex: 2;
}

.profile-info h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.profile-info ul {
    margin-bottom: 30px;
}

.profile-info ul li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.profile-info ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.expertise {
    margin-top: 30px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags span {
    padding: 8px 15px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 30px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tags span:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--secondary-color);
}

/* Services Section */
.services {
    padding: 100px 0;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-card:hover::before {
    height: 10px;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

/* Experience Section */
.experience {
    padding: 100px 0;
    background-color: var(--light-gray);
    position: relative;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    transition: var(--transition);
}

.timeline-item:hover .timeline-dot {
    background-color: var(--secondary-color);
    transform: translateX(-50%) scale(1.2);
}

.timeline-content {
    padding: 30px;
    background-color: var(--white-color);
    position: relative;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.timeline-date {
    color: var(--gray-color);
    font-style: italic;
    margin-bottom: 20px;
}

.timeline-description h5 {
    margin-bottom: 10px;
}

.timeline-description ul li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.timeline-description ul li::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    left: 0;
    top: 8px;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    position: relative;
}

.tab-header {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn.active, .tab-btn:hover {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.client-info {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--gray-color);
}

.view-all {
    text-align: center;
    margin-top: 40px;
}

/* Gallery Section */
.gallery {
    padding: 100px 0;
    background-color: var(--light-gray);
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    cursor: pointer;
    aspect-ratio: 3 / 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: white;
    transform: translateY(20px);
    transition: var(--transition);
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
}

.modal-img {
    width: 100%;
    height: auto;
    max-height: 90vh;
    object-fit: contain;
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.modal-prev, .modal-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-prev:hover, .modal-next:hover {
    background-color: var(--primary-color);
}

/* Certifications Section */
.certifications {
    padding: 100px 0;
    background-color: var(--light-gray);
    position: relative;
}

.certifications-content {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.cert-box {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    width: 350px;
    transition: var(--transition);
}

.cert-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cert-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-right: 20px;
    transition: var(--transition);
}

.cert-box:hover .cert-icon {
    transform: scale(1.1);
}

.cert-details h3 {
    color: var(--dark-color);
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.cert-number {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 5px;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    position: relative;
}

.contact-content {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-card {
    background-color: var(--white-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    transition: var(--transition);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-right: 20px;
    transition: var(--transition);
}

.contact-card:hover .contact-icon {
    transform: scale(1.1);
}

.contact-details h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background-color: var(--white-color);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.contact-form:hover {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    flex: 1;
    min-width: 300px;
}

.footer-logo h3 {
    color: var(--white-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.footer-links {
    flex: 1;
    min-width: 250px;
}

.footer-links h4, .footer-contact h4 {
    color: var(--white-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #aaa;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact {
    flex: 1;
    min-width: 250px;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive */
@media (max-width: 991px) {
    .section-title {
        font-size: 2.2rem;
    }
    
    .profile-content {
        flex-direction: column;
    }
    
    .profile-image {
        margin-bottom: 30px;
    }
    
    .timeline::before {
        left: 31px;
    }
    
    .timeline-dot {
        left: 31px;
    }
    
    .timeline-item {
        padding-left: 80px;
        padding-right: 0;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .hero-content h3 {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--white-color);
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
        padding: 20px;
        z-index: 1000;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin: 15px 0;
        margin-left: 0;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .certifications-content {
        flex-direction: column;
        align-items: center;
    }
    
    .cert-box {
        width: 100%;
    }
    
    .contact-content {
        flex-direction: column;
    }
    
    .contact-form {
        padding: 25px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-header {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-btn {
        margin-bottom: 5px;
    }
}

/* Botón volver arriba */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos adicionales para mejorar la usabilidad */
.img-hover {
    overflow: hidden;
}

.img-hover img {
    transition: transform 0.5s ease;
}

.img-hover:hover img {
    transform: scale(1.1);
}

/* Estilos para mensajes de alerta */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(46, 125, 50, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.alert-error {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border-left: 4px solid #f44336;
}

/* Ajustes finales para correcciones de compatibilidad */
@media print {
    header, footer, .back-to-top, .menu-toggle {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        max-width: none;
        padding: 0;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
}