/* ==========================================================================
   Mirada Publicitaria - Estilos principales
   Basado en plantilla "The Agency" - Adaptado para single-page
   ========================================================================== */

/* --------------------------------------------------------------------------
   Variables y Reset
   -------------------------------------------------------------------------- */
:root {
    --color-dark: #000;
    --color-dark-alt: #111;
    --color-dark-border: #222;
    --color-text-muted: rgba(255, 255, 255, 0.5);
    --color-text-light: #666;
    --color-white: #fff;
    --color-accent: #333;
    --font-display: 'Oswald', Arial, sans-serif;
    --font-body: 'Lato', Arial, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-white);
    background: var(--color-dark);
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Tipografía
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-white);
    margin-bottom: 1rem;
}

h1 {
    font-family: var(--font-body);
    font-size: 2.5rem;
    font-weight: 300;
    text-transform: none;
    letter-spacing: 0;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 400;
}

p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    outline: none;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transform: scale(1);
    transition: transform 4s ease, opacity 1s ease;
}

.hero.visible .hero-bg {
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1rem;
    max-width: 500px;
}

.hero-content h1 {
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease forwards;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition-normal);
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.btn-hero:hover {
    border-color: var(--color-white);
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.1);
}

.btn-hero i {
    animation: bounce 2s infinite;
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--color-dark);
    border-bottom: 1px solid var(--color-dark-border);
    z-index: 9999;
    display: flex;
    align-items: center;
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
}

.navbar.visible {
    transform: translateY(0);
}

.nav-logo {
    height: 50px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.nav-logo img {
    height: 100%;
    width: auto;
    max-height: 36px;
    object-fit: contain;
}

.nav-contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    margin-left: auto;
    color: var(--color-text-light);
    border-left: 1px solid var(--color-dark-border);
    transition: var(--transition-fast);
}

.nav-contact-icon:hover {
    background: var(--color-dark-border);
    color: var(--color-white);
}

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: none;
    border: none;
    border-left: 1px solid var(--color-dark-border);
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-toggle:hover {
    background: var(--color-dark-border);
    color: var(--color-white);
}

.nav-menu {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    background: var(--color-dark);
    border-bottom: 1px solid var(--color-dark-border);
    list-style: none;
}

.nav-menu.open {
    display: block;
}

.nav-menu li {
    border-top: 1px solid var(--color-dark-border);
}

.nav-menu a {
    display: block;
    padding: 1rem;
    color: var(--color-text-light);
    font-family: var(--font-display);
    text-transform: uppercase;
    text-align: center;
    transition: var(--transition-fast);
}

.nav-menu a:hover,
.nav-menu a.active {
    background: var(--color-dark-border);
    color: var(--color-white);
}

/* --------------------------------------------------------------------------
   About Section
   -------------------------------------------------------------------------- */
.about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-dark);
    padding: 4rem 1.5rem;
}

.about-content {
    max-width: 600px;
    text-align: center;
}

.about-content h2 {
    margin-bottom: 2rem;
}

.about-content p {
    font-size: 1.1rem;
}

.about-content strong {
    color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Services Section
   -------------------------------------------------------------------------- */
.services {
    background: var(--color-dark);
}

.services-header {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.services-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.services-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.services-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.services-header-content h2 {
    margin-bottom: 0.5rem;
}

.services-header-content p {
    font-size: 1rem;
    margin-bottom: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.service-card {
    padding: 2rem;
    text-align: center;
    border-bottom: 1px solid var(--color-dark-border);
}

.service-card:last-child {
    border-bottom: none;
}

.service-card h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.service-card h3 i {
    font-size: 1.2rem;
    width: 30px;
}

.service-card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Contact Section
   -------------------------------------------------------------------------- */
.contact {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    padding: 4rem 1.5rem;
}

.contact-container {
    width: 100%;
    max-width: 500px;
}

.contact h2 {
    text-align: center;
    color: var(--color-dark);
    margin-bottom: 2rem;
}

#contact-form {
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
}

#contact-form:hover {
    border-color: var(--color-dark);
}

.form-group {
    position: relative;
    margin-bottom: 1rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #ddd;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    padding-right: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-dark);
}

.form-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.form-group:has(textarea) .form-icon {
    display: none;
}

.btn-submit {
    width: 100%;
    padding: 0.85rem;
    background: var(--color-dark);
    color: var(--color-white);
    border: none;
    font-family: var(--font-display);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.btn-submit:disabled {
    background: #666;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1rem;
    padding: 0.75rem;
    text-align: center;
    display: none;
}

.form-status.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
    background: var(--color-dark);
    border-top: 1px solid var(--color-dark-border);
    padding: 3rem 1.5rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 2rem;
}

.footer-info h4,
.footer-location h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-info p,
.footer-location p {
    font-size: 0.95rem;
}

.location-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.location-item i {
    color: var(--color-white);
    width: 20px;
    text-align: center;
    margin-top: 0.25rem;
}

.location-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid var(--color-dark-border);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.85rem;
    margin-bottom: 0;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* --------------------------------------------------------------------------
   Media Queries - Tablet
   -------------------------------------------------------------------------- */
@media screen and (min-width: 768px) {
    h1 {
        font-size: 4rem;
    }

    h2 {
        font-size: 2rem;
    }

    .nav-logo {
        padding: 0 2rem;
        font-size: 1rem;
    }

    .nav-toggle {
        display: none;
    }

    .nav-menu {
        display: flex;
        position: static;
        background: none;
        border: none;
        margin-left: auto;
        margin-right: 0;
    }

    .nav-menu li {
        border-top: none;
        border-left: 1px solid var(--color-dark-border);
    }

    .nav-menu li:last-child {
        border-right: 1px solid var(--color-dark-border);
    }

    .nav-menu a {
        height: 50px;
        line-height: 50px;
        padding: 0 1.5rem;
    }

    .nav-contact-icon {
        margin-left: 0;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card {
        border-right: 1px solid var(--color-dark-border);
    }

    .service-card:nth-child(2n) {
        border-right: none;
    }

    .service-card:nth-last-child(-n+2) {
        border-bottom: none;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* --------------------------------------------------------------------------
   Media Queries - Desktop
   -------------------------------------------------------------------------- */
@media screen and (min-width: 1024px) {
    h1 {
        font-size: 5rem;
    }

    .navbar {
        height: 80px;
    }

    .navbar.scrolled {
        height: 50px;
    }

    .nav-logo {
        height: 80px;
        padding: 1rem 2rem;
    }

    .nav-logo img {
        max-height: 50px;
    }

    .navbar.scrolled .nav-logo {
        height: 50px;
        padding: 0.5rem 1rem;
    }

    .navbar.scrolled .nav-logo img {
        max-height: 36px;
    }

    .nav-contact-icon {
        width: 80px;
        height: 80px;
    }

    .navbar.scrolled .nav-contact-icon {
        width: 50px;
        height: 50px;
    }

    .nav-menu a {
        height: 80px;
        line-height: 80px;
        padding: 0 2.5rem;
    }

    .navbar.scrolled .nav-menu a {
        height: 50px;
        line-height: 50px;
        padding: 0 1.5rem;
    }

    .hero-content {
        max-width: 600px;
    }

    .hero-content p {
        font-size: 1.35rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 3rem 2rem;
    }

    .service-card {
        padding: 2.5rem;
    }

    .service-card:nth-child(2n) {
        border-right: 1px solid var(--color-dark-border);
    }

    .service-card:nth-child(3n) {
        border-right: none;
    }

    .service-card:nth-last-child(-n+2) {
        border-bottom: 1px solid var(--color-dark-border);
    }

    .service-card:nth-last-child(-n+3) {
        border-bottom: none;
    }
}
