/* Variables globales */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --section-bg-1: #f8f9fa;
    --section-bg-2: #e9ecef;
    --section-bg-3: #dee2e6;
    --section-bg-4: #ced4da;
    --header-bg: #ffffff; /* Fondo blanco */
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

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

/* Header y Navegación */
header {
    background-color: var(--header-bg);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

.logo h1 {
    margin: 0;
    font-size: 1.5rem;
    animation: fadeInRight 1s ease-out;
    color: var(--primary-color);
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.burger {
    display: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/01.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 60px;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
}

.hero-image {
    display: none;
}

.hero-image img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    margin-top: 2rem;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #2980b9;
}

/* Secciones */
section {
    padding: 5rem 0;
}

#inicio {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/01.jpg');
    background-size: cover;
    background-position: center;
}

#sobre-mi {
    background-color: var(--section-bg-1);
}

#servicios {
    background-color: var(--section-bg-2);
}

#cv {
    background-color: var(--section-bg-1);
}

#proyectos {
    background-color: var(--section-bg-2);
}

#contacto {
    background-color: var(--section-bg-1);
}

#contacto.contact {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-1 * ((100vw - 100%) / 2));
    padding-left: 0;
    padding-right: 0;
    background: #fff;
    border-bottom: 1px solid #eee;
}

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

footer {
    border-top: none;
}

h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Sobre Mí */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
    object-fit: cover;
}

.about-text {
    text-align: justify;
    line-height: 1.8;
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    overflow: hidden;
}

.about-text:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-bars {
    margin-top: 2rem;
}

.skill {
    margin-bottom: 1rem;
}

.bar {
    background-color: #ddd;
    height: 10px;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.progress {
    background-color: var(--accent-color);
    height: 100%;
    border-radius: 5px;
    width: 0;
    transition: width 1s ease-in-out;
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* CV */
.cv-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.cv-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cv-item h4 {
    color: var(--primary-color);
}

.date {
    color: var(--accent-color);
    font-size: 0.9rem;
}

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

.project-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.project-card h3 {
    padding: 1rem;
    color: var(--primary-color);
}

.project-card p {
    padding: 0 1rem 1rem;
}

/* Contacto */
.contact-content {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.contact-info {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.info-item i {
    color: var(--accent-color);
    margin-right: 1rem;
    font-size: 1.2rem;
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.contact-form textarea {
    height: 150px;
    resize: vertical;
}

.submit-btn {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #2980b9;
}

/* Footer */
footer {
    background: #fff;
    color: #222;
    padding: 2rem 0 0 0;
    border-top: 1px solid #eee;
    font-size: 1rem;
}

.footer-contact {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    padding: 1rem 0;
    gap: 1rem;
}

.footer-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 160px;
    font-size: 1rem;
}

.footer-item i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.footer-item a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-item a:hover {
    color: #3498db;
}

footer hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 0 0 1rem 0;
}

.footer-bottom {
    text-align: center;
    font-size: 0.95rem;
    color: #888;
    padding-bottom: 1rem;
}

.footer-bottom a {
    color: #3498db;
    text-decoration: none;
    margin: 0 0.5rem;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        box-shadow: var(--shadow);
    }
    .nav-links.active {
        display: flex;
    }
    .burger {
        display: block;
    }
    .burger div {
        width: 25px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 5px;
        transition: all 0.3s ease;
    }
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    .about-content,
    .cv-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .footer-contact {
        flex-direction: column;
        gap: 1.5rem;
    }
    .footer-item {
        min-width: unset;
    }
    .contact-info {
        padding: 0.7rem 0 0.1rem 0;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card,
.project-card,
.cv-item {
    animation: fadeIn 0.5s ease-out;
}

/* Animación del menú hamburguesa */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Animación de los enlaces del menú */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Ajustes para el botón CTA */
.cta-button {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 1rem;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Equipo */
.team {
    background-color: var(--section-bg-1);
    padding: 5rem 0;
}

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

.team-member {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 10px;
}

.member-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.member-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.member-title {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.member-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.member-experience h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.member-experience ul {
    list-style-type: none;
    padding-left: 0;
}

.member-experience li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.member-experience li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
}

@media (max-width: 768px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .member-image {
        height: 250px;
    }
}

#form-message {
    margin-bottom: 1rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}