@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
    --gold-primary: #d4af37;
    --gold-light: #f7eabc;
    --gold-dark: #b8860b;
    --dark: #222;
    --light: #ffffff;
    --gray: #f6f6f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--light);
    overflow-x: hidden;
    width: 100%;
    margin: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    box-shadow: none;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: 10px 0;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 5px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 60px;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 20%;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: var(--light);
}

.header.scrolled .logo-text {
    color: var(--dark);
}

.logo-text span {
    color: var(--gold-primary);
}

/* Ajustes para el nav contenedor */
.header nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    position: relative;
}

.header.scrolled .nav-link {
    color: var(--dark);
}

.nav-link:hover {
    color: var(--gold-primary);
}

.header.scrolled .nav-link:hover {
    color: var(--gold-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-primary);
    transition: width 0.3s ease;
}
/* Eliminar la línea animada debajo de los enlaces */
.nav-link::after {
  display: none !important; /* Oculta completamente el pseudoelemento */
  content: none !important; /* Alternativa para mayor compatibilidad */
}
.nav-link:hover::after {
    width: 100%;
}

.close-menu {
    display: none;
    font-size: 24px;
    color: var(--dark);
    cursor: pointer;
    padding: 10px;
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1001;
}

.nav-menu.active .close-menu {
    display: block;
}

.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease;
    background-color: var(--light);
}

.header.scrolled .bar {
    background-color: var(--dark);
}

/* Dropdown */
.dropdown {
    position: relative;
}

/* Estilo para el triángulo del dropdown */
.dropdown-toggle {
    position: relative;
}

.submenu {
    position: absolute;
    left: 0;
    top: 110%;
    background: var(--light);
    list-style: none;
    min-width: 230px;
    border: 1px solid #eee;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s;
    z-index: 999;
}

.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 12px 18px;
    color: var(--dark);
    font-size: 14px;
    text-decoration: none;
}

.submenu li a:hover {
    background: var(--gray);
    color: var(--gold-primary);
}

/* Hero Section */
.hero {
    width: 100%;
    height: 60vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Imagenes/banner_atm.png') center/cover no-repeat;
    display: flex;  
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light);
    position: relative;
    margin: 0;
    padding: 0;
}

.hero-content {
    max-width: 800px;
    width: 90%;
    padding: 0 15px;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s forwards 0.5s;
}

.hero-title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--gold-light), var(--gold-primary), var(--gold-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: clamp(14px, 2.5vw, 18px);
    font-weight: 400;
    margin-bottom: 25px;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--gold-primary);
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: transparent;
    color: var(--gold-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* About A.T.M. Section */
.about-telerradiografia {
    padding: 80px 0;
    background-color: var(--light);
}

.section-title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--gold-primary);
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.about-text {
    flex: 1;
    min-width: 280px;
    padding: 0 15px;
    opacity: 1; /* Ensure content is visible by default */
    transform: translateY(0); /* Remove initial transform */
}

.about-text.animate {
    animation: fadeInUp 1s forwards; /* Animation still applies if .animate is added */
}

.about-subsection {
    margin-bottom: 40px;
}

.about-subsection h3 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
}

.about-subsection h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.about-subsection p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

.about-image-inline {
    text-align: center;
    margin-top: 20px;
}

.about-image-inline img {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.highlight {
    color: var(--gold-primary);
    font-weight: 700;
}

.telerradiografia-types {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.telerradiografia-type {
    flex: 1;
    min-width: 280px;
    padding: 20px;
    background-color: var(--gray);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.telerradiografia-type:hover {
    transform: translateY(-5px);
}

.telerradiografia-image {
    margin-bottom: 15px;
    text-align: center;
}

.telerradiografia-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.observation-list {
    list-style: none;
    margin-bottom: 20px;
}

.observation-list li {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.observation-list li::before {
    content: '•';
    color: var(--gold-primary);
    font-size: 20px;
    position: absolute;
    left: 0;
    top: 0;
}

.cta-button-wrapper {
    text-align: center;
    margin-top: 30px;
}

/* Ventajas Section */
.ventajas {
    padding: 80px 0;
    background-color: #f0f0f0;
}

.ventajas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    justify-items: center;
}

.ventaja-card {
    background-color: var(--light);
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease-in-out forwards;
}

.ventaja-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.25);
}

.ventaja-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--gold-light);
}

.ventaja-icon i {
    font-size: 36px;
    color: var(--gold-primary);
}

.ventaja-content {
    padding: 20px;
    text-align: center;
}

.ventaja-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark);
}

.ventaja-text {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    padding: 80px 0;
    background-color: var(--dark);
    position: relative;
    overflow: hidden;
}

.gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/api/placeholder/100/100') center/30px repeat;
    opacity: 0.03;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--gold-primary);
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.gallery .section-title {
    color: var(--light);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    aspect-ratio: 4 / 3;
    max-height: 400px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s ease;
    /* Add display flex to center content */
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item.animate {
    animation: zoomIn 0.8s forwards;
}

.gallery-image {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.5s ease;
    padding: 0;
    /* Ensure the image itself maintains its aspect ratio */
    max-width: 100%;
    max-height: 100%;
}

.gallery-image .primary-img {
    transition: opacity 0.5s ease;
}

.gallery-image .hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    object-fit: contain;
    z-index: 1; /* Below overlay but above primary image */
}

.gallery-item:hover .gallery-image .primary-img {
    opacity: 0;
    transform: scale(1.1);
}

.gallery-item:hover .gallery-image .hover-img {
    opacity: 1;
    transform: none;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2; /* Ensure overlay is above the images */
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-info {
    padding: 15px;
    width: 100%;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-info {
    transform: translateY(0);
}

.gallery-info h3 {
    color: var(--gold-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.gallery-info p {
    color: var(--light);
    font-size: 13px;
}

/* Equipment Gallery Styles - Agregados del primer archivo */
.equipment-gallery {
    padding: 80px 0;
    background-color: var(--dark);
    position: relative;
    overflow: hidden;
}

.equipment-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/api/placeholder/100/100') center/30px repeat;
    opacity: 0.03;
}

.equipment-gallery .section-title {
    color: var(--light);
}

.equipment-gallery .gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.equipment-gallery .gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    height: 220px;
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-button {
    text-align: center;
}

/* Call to Action Section */
.cta {
    padding: 60px 0;
    background-color: var(--light);
    text-align: center;
}

.cta-text {
    font-size: 16px;
    color: #555;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto 20px;
}

/* Footer */
.footer {
    background-color: var(--dark);
    padding: 40px 0 0;
    color: var(--light);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--gold-dark), var(--gold-primary), var(--gold-light), var(--gold-primary), var(--gold-dark));
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.footer-logo {
    min-width: 220px;
}

.footer-logo .logo-text {
    font-size: 22px;
    font-weight: 700;
}

.footer-logo .logo-text span {
    color: var(--gold-primary);
}

.footer-text {
    max-width: 280px;
    font-size: 13px;
    line-height: 1.7;
    color: #999;
    margin-bottom: 15px;
}

.footer-links {
    min-width: 180px;
}

.footer-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--light);
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 8px;
}

.footer-menu a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
}

.footer-menu a:hover {
    color: var(--gold-primary);
    padding-left: 5px;
}

.footer-newsletter {
    min-width: 220px;
}

.footer-newsletter p {
    font-size: 13px;
    line-height: 1.7;
    color: #999;
    margin-bottom: 15px;
}

.newsletter-form {
    display: flex;
}

.newsletter-input {
    flex: 1;
    padding: 10px 12px;
    background-color: #333;
    border: none;
    color: var(--light);
    font-size: 13px;
    border-radius: 5px 0 0 5px;
}

.newsletter-input:focus {
    outline: none;
}

.newsletter-btn {
    background-color: var(--gold-primary);
    color: var(--light);
    border: none;
    padding: 0 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-btn:hover {
    background-color: var(--gold-dark);
}

.copyright {
    text-align: center;
    padding: 15px 0;
    font-size: 13px;
    color: #888;
    border-top: 1px solid #333;
    margin-top: 20px;
}

.copyright .highlight {
    color: var(--gold-primary);
    font-weight: 700;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    background-color: var(--gold-primary);
    color: var(--light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--gold-dark);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Styles */
@media (max-width: 991px) {
    .about-text {
        flex: 100%;
        padding: 0;
        text-align: center;
    }

    .about-image-inline {
        margin-bottom: 30px;
    }

    .telerradiografia-types {
        flex-direction: column;
        align-items: center;
    }

    .telerradiografia-image {
        display: flex;
        justify-content: center;
    }

    .ventajas-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    
    .gallery-container,
    .equipment-gallery .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
        margin-left: 10px;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--light);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 60px 0;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 15px 0;
    }

    .nav-link {
        color: var(--dark);
        font-size: 16px;
    }

    .nav-link:hover {
        color: var(--gold-primary);
    }

    .dropdown .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s;
    }

    .dropdown.open .submenu {
        max-height: 600px;
    }

    .dropdown-toggle::after {
        content: '▸';
        margin-left: 6px;
    }

    .dropdown.open .dropdown-toggle::after {
        content: '▾';
    }

    .hero {
        height: 50vh;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-logo, .footer-links, .footer-newsletter {
        margin-bottom: 20px;
    }

    .social-links {
        justify-content: center;
    }

    .gallery-container,
    .equipment-gallery .gallery-container {
        grid-template-columns: 1fr;
    }

    .gallery-item,
    .equipment-gallery .gallery-item {
        max-height: 300px;
    }
}

/* Fix for medium screens */
@media (max-width: 768px) and (min-width: 577px) {
    .gallery-container,
    .equipment-gallery .gallery-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 576px) {
    .logo-img {
        height: 50px;
    }

    .logo-text {
        font-size: 18px;
    }

    .hero {
        height: 40vh;
    }

    .hero-title {
        font-size: clamp(24px, 6vw, 32px);
    }

    .hero-subtitle {
        font-size: clamp(12px, 3vw, 16px);
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .about-telerradiografia, .ventajas, .gallery, .equipment-gallery, .cta {
        padding: 60px 0;
    }

    .section-title {
        font-size: clamp(24px, 3.5vw, 30px);
    }

    .ventaja-card {
        max-width: 100%;
    }

    .gallery-container,
    .equipment-gallery .gallery-container {
        grid-template-columns: 1fr;
        /* Add some padding for better spacing */
        padding: 0 10px;
    }
    
    .gallery-item,
    .equipment-gallery .gallery-item {
        max-height: 250px;
        /* Ensure content is centered on very small screens */
        width: 100%;
    }
}
