/* Reset y variables */
:root {
    --primary-color: #003366;
    --secondary-color: #0066cc;
    --accent-color: #ff9900;
    --text-color: #333333;
    --background-color: #ffffff;
    --transition: all 0.3s ease;
    --navbar-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    padding-top: var(--navbar-height);
}

/* Navbar Styles */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
    height: var(--navbar-height);
    display: flex;
    align-items: center;
}

.navbar.scrolled {
    background: rgba(0, 51, 102, 0.95);
    height: 60px;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    font-size: 0.95rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: calc(100vh - var(--navbar-height));
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/Mural.jpeg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 2rem;
    margin-top: calc(-1 * var(--navbar-height));
    padding-top: calc(var(--navbar-height) + 2rem);
}

.hero-content {
    max-width: 800px;
}

.hero-logo {
    width: 200px;
    height: auto;
    margin-bottom: 2rem;
    animation: fadeInDown 1s ease;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.3s;
    animation-fill-mode: both;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.9s;
    animation-fill-mode: both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn.primary {
    background-color: var(--accent-color);
    color: white;
}

.btn.primary:hover {
    background-color: #e68a00;
    transform: translateY(-2px);
}

.btn.secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}

.btn.secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Producciones Section (3D Gallery) */
.producciones-section {
    padding: 6rem 1rem;
    background: linear-gradient(to bottom, #070707, #050505);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.producciones-section .section-title {
    color: white;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
}

.gallery-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    perspective: 1000px;
    z-index: 1;
}

.container {
    width: 160px;
    height: 240px;
    position: relative;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    animation: gallery 80s linear infinite;
}

.container:hover {
    animation-play-state: paused;
}

.container span {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: center;
    transform-style: preserve-3d;
    transform: rotateY(calc(var(--i) * 36deg)) translateZ(300px);
    -webkit-box-reflect: below 0px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.2));
}

.container span img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    backface-visibility: hidden;
    background: #000;
}

.container span img:hover {
    transform: scale(1.05);
    border-color: var(--accent-color);
    box-shadow: 0 0 20px rgba(255, 153, 0, 0.3);
}

.clickable-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.1);
}

/* Single Image Sections */
.single-image-section {
    padding: 4rem 1rem;
    background-color: #ffffff;
    overflow: hidden;
}

.single-image-section.alternate {
    background-color: #f5f5f5;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.single-image-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s;
}

.single-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.single-image-container:hover img {
    transform: scale(1.02);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.single-image-container:hover .image-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Location Section */
.location-section {
    padding: 8rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.location-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.location-info {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.location-info h3 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.location-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: var(--transition);
}

.location-detail:hover {
    transform: translateX(10px);
    background: #f1f3f5;
}

.location-detail svg {
    width: 24px;
    height: 24px;
    color: var(--accent-color);
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 4rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    margin: 0.5rem 0;
}

.footer-section a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
}

.social-link:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* Mobile Menu */
.menu-btn {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    z-index: 1002;
    margin-left: auto;
}

.menu-btn span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

.menu-btn span:first-child {
    top: 0;
}

.menu-btn span:nth-child(2) {
    top: 8px;
}

.menu-btn span:last-child {
    top: 16px;
}

.menu-btn.active span:first-child {
    transform: rotate(45deg);
    top: 8px;
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:last-child {
    transform: rotate(-45deg);
    top: 8px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gallery {
    0% {
        transform: perspective(1000px) rotateY(0deg);
    }
    100% {
        transform: perspective(1000px) rotateY(360deg);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container span {
        transform: rotateY(calc(var(--i) * 36deg)) translateZ(280px);
    }
    
    .container {
        width: 150px;
        height: 225px;
    }
    
    .single-image-container {
        max-width: 90%;
    }
}

@media (max-width: 992px) {
    .container span {
        transform: rotateY(calc(var(--i) * 36deg)) translateZ(250px);
    }
    
    .container {
        width: 140px;
        height: 210px;
    }
    
    .gallery-wrapper {
        height: 350px;
    }

    .section-title {
        font-size: 2rem;
    }

    .single-image-container {
        max-width: 85%;
    }

    .image-caption {
        font-size: 1.25rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 60px;
    }

    .menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--primary-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        z-index: 1001;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.2s;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        display: block;
        text-align: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .producciones-section {
        padding: 4rem 1rem;
    }

    .producciones-section .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
    }

    .container {
        width: 120px;
        height: 180px;
    }

    .container span {
        transform: rotateY(calc(var(--i) * 36deg)) translateZ(200px);
    }
    
    .gallery-wrapper {
        height: 300px;
    }

    .location-container {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        width: 100px;
        height: 150px;
    }

    .container span {
        transform: rotateY(calc(var(--i) * 36deg)) translateZ(160px);
    }
    
    .gallery-wrapper {
        height: 250px;
    }

    .producciones-section .section-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .nav-container {
        padding: 0.5rem 1rem;
    }

    .logo img {
        height: 40px;
    }

    .hero-logo {
        width: 150px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .single-image-container {
        aspect-ratio: 4/3;
        margin: 1rem auto;
    }

    .image-caption {
        font-size: 1rem;
        padding: 1rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 90px;
        height: 135px;
    }

    .container span {
        transform: rotateY(calc(var(--i) * 36deg)) translateZ(140px);
    }
}

/* Touch Device Support */
@media (hover: none) {
    .nav-links a:hover::after {
        width: 0;
    }

    .nav-links a:active::after {
        width: 100%;
    }

    .btn:active {
        transform: scale(0.95);
    }

    .container {
        animation-duration: 100s;
    }

    .container span img {
        pointer-events: auto;
    }

    .container:active {
        animation-play-state: paused;
    }

    .container span img:active {
        transform: scale(1.1);
        border-color: var(--accent-color);
    }

    .single-image-container:hover {
        transform: none;
    }

    .single-image-container:hover img {
        transform: none;
    }
}

/* Prevent gallery overflow on very small screens */
@media (max-height: 600px) {
    .container {
        scale: 0.8;
    }
}

@media (max-height: 500px) {
    .container {
        scale: 0.7;
    }
}

/* iOS Specific */
@supports (-webkit-touch-callout: none) {
    .hero {
        background-attachment: scroll;
    }
}