/* Importar fuentes de Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&family=Oswald:wght@400;500;600;700&display=swap');

/* Estilos generales */
/* Estilos para el head */
header {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo a {
    color: var(--light-color);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.logo i {
    color: var(--secondary-color);
    font-size: 2rem;
    transition: var(--transition);
    display: inline-block;
}

.logo a:hover {
    color: var(--secondary-color);
}

/* Navegación */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Oswald', sans-serif;
    color: rgba(14, 14, 14, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--light-color);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    background-color: var(--light-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 80%;
    background-color: var(--light-color);
}

/* Menú hamburguesa */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Estilos para pantallas medianas */
@media (min-width: 769px) and (max-width: 850px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        font-size: 1rem;
        padding: 0.5rem 0.75rem;
    }
    
    .logo a {
        font-size: 1.3rem;
    }
}

/* Estilos para móviles */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--dark-color);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        transition: var(--transition);
        gap: 1.5rem;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 1rem 0;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
}

/* Estilos generales */
:root {
    --primary-color: #121212;
    --secondary-color: #a6a6a6;
    --accent-color: #f5f5f5;
    --light-color: #f5f5f5;
    --dark-color: #121212;
    --text-color: #333333;
    --text-light: #a6a6a6;
    --transition: all 0.3s ease;
}

/* Tipografías */
body {
    font-family: 'Nunito', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

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

a:hover {
    color: var(--secondary-color);
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

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

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 15px auto 0;
}

.bg-light {
    background-color: var(--light-color);
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

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

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

/* Estilos para las imágenes de los proyectos */
.portfolio-image {
    height: 250px;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cambiado de 'cover' a 'contain' para mostrar la imagen completa */
    transition: var(--transition);
    padding: 15px; /* Espaciado alrededor de la imagen */
    max-width: 100%;
    max-height: 100%;
}

/* Fondo de respaldo para imágenes con transparencia */
.portfolio-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-conic-gradient(#f0f0f0 0% 25%, #e0e0e0 0% 50%);
    background-size: 16px 16px;
    z-index: 0;
    opacity: 0.5;
}

.portfolio-image img {
    position: relative;
    z-index: 1;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Estilos para cuando no hay imagen */
.portfolio-image::before {
    content: 'Sin imagen';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-size: 0.9rem;
    z-index: 1;
    background: white;
    padding: 5px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Efecto hover para las imágenes */
.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Ajustes para diferentes tamaños de pantalla */
@media (max-width: 768px) {
    .portfolio-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .portfolio-image {
        height: 180px;
    }
}

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

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

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: var(--dark-color);
    color: white;
    padding: 80px 20px;
    position: relative;
}

.hero .container {
    width: 100%;
    max-width: 800px;
    margin: 0;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin: 0 0 1rem 0;
    line-height: 1.2;
    max-width: 100%;
    width: 100%;
}

.hero p {
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    max-width: 100%;
    width: 100%;
    line-height: 1.5;
    font-weight: 300;
    opacity: 0.9;
}

/* CTA Box */
.cta-box {
    text-align: center;
    padding: 3rem 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 3rem 0;
}

.cta-box h2 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.cta-box p {
    margin-bottom: 2rem;
    color: var(--text-color);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-box .btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Service features list styling */
.service-features {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
    text-align: left;
}

.service-features li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 1.75rem;
}

.service-features li i {
    position: absolute;
    left: 0;
    top: 0.25rem;
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
}

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Pricing Section */
.pricing-section {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

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

.pricing-card {
    background: white;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.pricing-card.featured {
    border: 2px solid var(--secondary-color);
    transform: scale(1.02);
}

.pricing-card.featured:hover {
    transform: scale(1.02) translateY(-5px);
}

.pricing-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 400;
}

.features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    flex-grow: 1;
}

.features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.features li:last-child {
    border-bottom: none;
}

.features i {
    color: var(--secondary-color);
}

.pricing-card .btn {
    display: block;
    text-align: center;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.pricing-card .btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.pricing-card .btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Style for the 'x' (cross) icons in pricing cards */
.pricing-card .features .fa-times {
    color: #ff4d4d; /* Red color for the 'x' icon */
}

.popular-tag {
    position: absolute;
    top: -12px;
    right: 2rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section */
#contacto .container > h2 {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
    font-size: 2.5rem;
    color: var(--dark-color);
}

#contacto .container > h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

/* Formulario Personalizado */
.form-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-title {
    text-align: center;
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i,
.input-with-icon .svg-icon {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    pointer-events: none;
    z-index: 2;
}

.input-with-icon .svg-icon {
    width: 16px;
    height: 16px;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fff;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
    outline: none;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
    padding: 12px 15px;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper i {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    pointer-events: none;
    z-index: 2;
}

.form-group select {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.form-group select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
    outline: none;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
}

/* Estilos para el mensaje de respuesta */
#form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
}

#form-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    display: block;
}

#form-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
    display: block;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
    bottom: 0;
    left: 0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
}

.footer-section ul li a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Sobre Mí */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 40px;
}

.about-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.profile-image {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-height: 500px;
    width: auto;
    object-fit: cover;
}

.about-image:hover .profile-image {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.about-content {
    flex: 1;
}

.about-content h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.about-content h3::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    bottom: -10px;
    left: 0;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 25px;
    text-align: justify;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
}

.skill-tag {
    background-color: var(--light-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
    
    .about-content h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .skills {
        justify-content: center;
    }
    
    .about-content .btn {
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .section {
        padding: 60px 0;
    }
}
/* === FIX Sobre Mí: que el texto ocupe todo el ancho y quede justificado === */

/* El contenedor de la sección (2 columnas: imagen + contenido) se mantiene */
#presentacion .about-container {
  display: flex;
  align-items: center;
  gap: 50px;
}

/* Forzar #about-content a ser un bloque (no 2 columnas internas) */
#presentacion #about-content.about-content {
  display: block !important;     /* sobrescribe el display:flex anterior */
  flex: 1 1 0;
  min-width: 320px;
  padding: 20px;
}

/* Ocultar cualquier .about-image que haya quedado DENTRO de #about-content */
#presentacion #about-content > .about-image {
  display: none !important;
}

/* Asegurar que el bloque de texto use todo el ancho disponible */
#presentacion .about-content .about-text {
  width: 100%;
  max-width: 80ch;               /* opcional: mejora legibilidad en desktop */
}

/* Párrafo justificado y con guiones automáticos (desktop y mobile) */
#presentacion .about-content p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;         /* soporte Safari */
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 25px;
  color: var(--text-color);
}

/* Skills en línea y envolviendo */
#presentacion .about-content .skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 25px 0;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  #presentacion .about-container {
    flex-direction: column;      /* imagen arriba, texto abajo */
    align-items: stretch;
    gap: 30px;
  }
  #presentacion #about-content.about-content {
    min-width: 0;
    padding: 16px;
  }
  #presentacion .about-content .about-text {
    max-width: none;             /* en mobile usa todo el ancho */
  }
  #presentacion .about-content p {
    font-size: 1rem;             /* un poco más chico para móvil */
  }
}
/* === CONTACTO: ancho controlado + grid responsive === */
#contacto .contact-form form {
  max-width: 700px;            /* un poco más ancho para 2 cols */
  margin: 0 auto;
  background: #fff;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.08);

  display: grid;
  grid-template-columns: 1fr;  /* mobile: 1 columna */
  gap: 16px;
}

/* Inputs/textarea: full width dentro de cada celda */
#contacto .contact-form input,
#contacto .contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
#contacto .contact-form input:focus,
#contacto .contact-form textarea:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(166,166,166,0.15);
}

/* Botón centrado y ancho controlado */
#contacto .contact-form .btn {
  justify-self: center;     /* centra en la grilla */
  width: 100%;
  max-width: 220px;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 700;
}

/* --- Desktop: 2 columnas --- */
@media (min-width: 768px) {
  #contacto .contact-form form {
    grid-template-columns: 1fr 1fr; /* 2 columnas */
    gap: 20px;
  }
  /* 1er grupo (Nombre) col 1, 2do (Email) col 2 */
  #contacto .contact-form .form-group:nth-child(1) { grid-column: 1; }
  #contacto .contact-form .form-group:nth-child(2) { grid-column: 2; }

  /* 3er grupo (Mensaje) ocupa ambas columnas */
  #contacto .contact-form .form-group:nth-child(3) {
    grid-column: 1 / -1;
  }

  /* Botón ocupa ambas columnas y se centra */
  #contacto .contact-form .btn {
    grid-column: 1 / -1;
  }
}
