/* Variables globales */
:root {
    --primary-color: #333333;
    --secondary-color: #666666;
    --accent-color: #000000;
    --background-color: #ffffff;
    --text-color: #333333;
    --spacing-unit: 1rem;
    --navbar-height: 4rem;
    --footer-height: 4rem;
}

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

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    padding-bottom: var(--footer-height);
}

/* Navegación */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-brand a {
    font-size: 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.nav-links a {
    margin-left: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Landing Container */
.landing-container {
    flex: 1;
    margin-top: var(--navbar-height);
    margin-bottom: 0;
    min-height: calc(100vh - var(--navbar-height) - var(--footer-height));
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.background-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    padding: 3rem;
    border-radius: 8px;
    max-width: 800px;
    margin: 0 2rem;
    width: calc(100% - 4rem);
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--secondary-color);
}

/* Featured Section */
.featured-section {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.featured-section h2 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    flex: 1;
}

.featured-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    height: 100%;
}

.featured-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-item:hover .featured-overlay {
    opacity: 1;
}

.featured-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.featured-overlay p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    max-width: 80%;
}

.view-more {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.view-more:hover {
    background: white;
    color: var(--accent-color);
}

/* Footer */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    background-color: rgba(248, 248, 248, 0.95);
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow: hidden;
}

.footer-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    max-width: 100%;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(0.2rem, 1vw, 0.5rem);
    width: 100%;
    padding: 0 0.25rem;
}

.social-links a {
    color: var(--accent-color);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin: 0 clamp(0.15rem, 1vw, 0.5rem);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(1.5rem, 4vw, 2rem);
    height: clamp(1.5rem, 4vw, 2rem);
}

/* Proyectos */
.projects-page {
    padding: 120px 5% 5%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.project-card {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.project-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

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

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease-in-out;
}

.project-image img.bn-image {
    opacity: 1;
    z-index: 1;
}

.project-image img.color-image {
    opacity: 0;
    z-index: 2;
}

.project-card:hover .project-image img.color-image {
    opacity: 1;
}

.project-card:hover .project-image img.bn-image {
    opacity: 0;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.project-info p {
    color: var(--secondary-color);
    line-height: 1.6;
}

/* Página de contacto */
.contact-page {
    padding: 2rem 1rem;
    margin-top: var(--navbar-height);
    margin-bottom: var(--footer-height);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-details {
    margin: 2rem 0;
}

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

.contact-item i {
    margin-right: 1rem;
    color: var(--accent-color);
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
}

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

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

/* Responsive Styles */
@media (max-width: 768px) {
    :root {
        --navbar-height: 3.5rem;
        --footer-height: 3.5rem;
    }

    .navbar {
        padding: 0 1rem;
    }

    .nav-brand a {
        font-size: 1.2rem;
    }

    .nav-links a {
        margin-left: 1rem;
        font-size: 0.9rem;
    }

    .hero-content {
        padding: 1.5rem;
        margin: 0 1rem;
        width: calc(100% - 2rem);
    }

    .social-links {
        gap: 0.15rem;
    }
    
    .social-links a {
        font-size: 1.2rem;
        margin: 0 0.15rem;
    }

    .footer-content {
        gap: 0.15rem;
    }

    .contact-container {
        padding: 0.5rem;
        flex-direction: column;
    }

    .contact-info,
    .contact-form {
        width: 100%;
        padding: 1rem;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        box-sizing: border-box;
    }

    .project-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 1rem;
    }

    .nav-links a {
        margin-left: 0.5rem;
        font-size: 0.8rem;
    }

    .contact-page {
        padding: 1rem 0.5rem;
    }

    .contact-container {
        padding: 0.25rem;
    }

    .social-links a {
        font-size: 1rem;
        margin: 0 0.15rem;
    }

    .project-image {
        height: 180px;
    }

    .project-info {
        padding: 1rem;
    }
}

@media (max-width: 320px) {
    .footer-content {
        font-size: 0.65rem;
    }

    .social-links a {
        font-size: 1rem;
        min-width: 1.25rem;
        height: 1.25rem;
        margin: 0 0.1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) {
    .nav-links a:hover,
    .social-links a:hover {
        color: var(--secondary-color);
    }
}

/* Landscape Mode */
@media (max-height: 500px) and (orientation: landscape) {
    :root {
        --navbar-height: 3rem;
        --footer-height: 3rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h1 {
        margin-bottom: 0.5rem;
    }
}

/* High-DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-content {
        backdrop-filter: blur(5px);
    }
}

/* Vista Detalle Proyecto */
.project-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow-y: auto;
}

.project-detail-content {
    position: relative;
    width: 90%;
    max-width: 1400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    min-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-detail-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--accent-color);
    background: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-detail-close:hover {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
}

.project-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.project-detail-header h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.project-detail-header p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--secondary-color);
}

.project-detail-gallery {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-main-image {
    width: 100%;
    height: 60vh;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background-color: #f5f5f5;
}

.project-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.project-thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) #f1f1f1;
}

.project-thumbnail {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    overflow: hidden;
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-thumbnail.active {
    opacity: 1;
    border-color: var(--accent-color);
}

.project-thumbnail:hover {
    opacity: 1;
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-detail-info {
    padding: 2rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.project-detail-info h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

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

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.metadata-item strong {
    color: var(--accent-color);
}

/* Responsive styles for project detail */
@media (max-width: 768px) {
    .project-detail-content {
        width: 95%;
        padding: 1.5rem;
        gap: 1.5rem;
        margin: 1rem auto;
    }

    .project-main-image {
        height: 40vh;
    }

    .project-thumbnail {
        width: 80px;
        height: 80px;
    }

    .project-detail-info {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .project-detail-content {
        width: 100%;
        padding: 1rem;
        gap: 1rem;
        margin: 0.5rem auto;
    }

    .project-main-image {
        height: 30vh;
    }

    .project-thumbnail {
        width: 60px;
        height: 60px;
    }

    .project-detail-info {
        padding: 1rem;
    }
} 