@charset "UTF-8";

/* Estilos Generales */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

h1, h2 {
    text-align: center;
    color: #2c3e50;
}

h2 {
    margin-top: 4rem;
    margin-bottom: 2rem;
}

section {
    padding: 2rem 5%;
    max-width: 1000px;
    margin: 0 auto;
}

/* Header y Navegación */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: #2c3e50;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

header.scrolled nav .logo a {
    color: #ffffff;
}

header.scrolled nav ul li a {
    color: #ecf0f1;
}

header.scrolled nav ul li a:hover {
    color: #3498db;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
}

nav .logo img {
    height: 40px;
    width: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Sección Inicio (Hero) */
#inicio {
    padding: 0;
    max-width: none;
}
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7)), url('images/web/pexels-joshsorenson-1714203.jpg') no-repeat center center/cover;
    color: #ffffff;
    text-align: center;
    padding: 8rem 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-button {
    background-color: #3498db;
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #2980b9;
}

/* Sección Servicios */
.service-cards {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    flex-basis: 300px;
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.card:hover .card-img img {
    transform: scale(1.1);
}

.card h3, .card p {
    padding: 0 1.5rem;
}

.card p {
    padding-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card h3 {
    color: #3498db;
    margin-top: 1rem;
}

/* Sección Portafolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item.featured {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
}

.portfolio-item.testiliza {
    background: linear-gradient(140deg,
        #1a0933 0%,
        #5b1fa8 25%,
        #8b5cf6 45%,
        #c9a84c 65%,
        #a0a0a0 82%,
        #111111 100%
    );
}

.portfolio-item.testiliza img {
    mix-blend-mode: screen;
    max-width: 80%;
    max-height: 80%;
}

.portfolio-item.featured a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.portfolio-item.featured img {
    width: auto;
    height: auto;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(44, 62, 80, 0.95));
    color: #ffffff;
    padding: 2rem 1rem 1rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    margin: 0 0 0.3rem;
    font-size: 1.1rem;
}

.portfolio-overlay p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.portfolio-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.portfolio-link {
    display: inline-block;
    margin-top: 0.8rem;
    padding: 0.4rem 1rem;
    background-color: #3498db;
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.3s;
}

.portfolio-link:hover {
    background-color: #2980b9;
}

/* Sección Sobre Nosotros */
.about-content {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
}

.about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text p {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.about-features {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.about-features li {
    background-color: #3498db;
    color: #ffffff;
    padding: 0.8rem 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
}

/* Sección Contacto */
.contact-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    align-items: flex-start;
}

.contact-info {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: #ffffff;
    padding: 1.2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.contact-icon {
    font-size: 1.5rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.contact-item h4 {
    margin: 0 0 0.3rem;
    color: #2c3e50;
}

.contact-item p,
.contact-item a {
    margin: 0;
    color: #555;
    text-decoration: none;
}

.contact-item a:hover {
    color: #3498db;
}

#contacto form {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#contacto input,
#contacto textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    box-sizing: border-box;
}

#contacto button {
    background-color: #2ecc71;
    color: #ffffff;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    align-self: center;
}

#contacto button:hover {
    background-color: #27ae60;
}

/* Mensajes de estado del formulario */
.form-message {
    display: none;
    padding: 1.2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    font-size: 1rem;
    animation: slideIn 0.4s ease-out;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.form-message.success::before {
    content: "✓ ";
    font-size: 1.2rem;
}

.form-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.form-message.error::before {
    content: "✕ ";
    font-size: 1.2rem;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estado de carga del botón */
#contacto button.loading {
    opacity: 0.7;
    cursor: wait;
}

#contacto button.loading::after {
    content: " ⏳";
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 4rem;
    background-color: #2c3e50;
    color: #ecf0f1;
}
