/* EXOSTEM - Estilos Responsivos */

/* Pantallas Extra Grandes (1400px+) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
}

/* Pantallas Grandes (1200px - 1399px) */
@media (max-width: 1399px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .research-stats {
        gap: 1.5rem;
    }
}

/* Pantallas Medianas (992px - 1199px) */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .research-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        margin-bottom: 1rem;
    }
    
    .alliances-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Pantallas Pequeñas (768px - 991px) */
@media (max-width: 991px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .navbar-brand:hover .logo-img {
        transform: scale(1.15);
    }
    
    .btn-grid-corporate {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-left: 0.75rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        text-align: center;
    }
    
    .hero-buttons {
        text-align: center;
    }
    
    .hero-visual {
        height: 300px;
        margin-top: 2rem;
    }
    
    .dna-helix {
        width: 150px;
        height: 250px;
    }
    
    .cell-structure {
        width: 120px;
        height: 120px;
    }
    
    .cell-nucleus {
        width: 50px;
        height: 50px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .product-card {
        margin-bottom: 2rem;
    }
    
    .service-card {
        margin-bottom: 2rem;
    }
    
    .alliances-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Pantallas Muy Pequeñas (576px - 767px) */
@media (max-width: 767px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .logo-img {
        height: 30px;
    }
    
    .navbar-brand:hover .logo-img {
        transform: scale(1.12);
    }
    
    .navbar-brand:hover {
        transform: translateY(-1px);
    }
    
    .btn-grid-corporate {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-left: 0.5rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-visual {
        height: 250px;
    }
    
    .dna-helix {
        width: 120px;
        height: 200px;
    }
    
    .cell-structure {
        width: 100px;
        height: 100px;
    }
    
    .cell-nucleus {
        width: 40px;
        height: 40px;
    }
    
    .molecule {
        width: 15px;
        height: 15px;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .products-showcase,
    .services-section,
    .research-section,
    .alliances-section,
    .cta-section {
        padding: 3rem 0;
    }
    
    .product-content {
        padding: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .alliances-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .alliance-item {
        padding: 0.5rem;
    }
    
    .alliance-item img {
        max-height: 50px;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-logo {
        height: 40px;
    }
    
    .social-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 80px;
        right: 20px;
        font-size: 1rem;
    }
}

/* Pantallas Extra Pequeñas (hasta 575px) */
@media (max-width: 575px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .product-content h3 {
        font-size: 1.1rem;
    }
    
    .product-content p {
        font-size: 0.9rem;
    }
    
    .service-card h4 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .cta-title {
        font-size: 1.6rem;
    }
    
    .cta-subtitle {
        font-size: 0.9rem;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-description {
        font-size: 0.9rem;
    }
    
    .footer-links a {
        font-size: 0.9rem;
    }
    
    .contact-item {
        font-size: 0.9rem;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
    }
    
    .legal-link {
        font-size: 0.8rem;
    }
}

/* Orientación Landscape en móviles */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .hero-visual {
        height: 200px;
    }
    
    .dna-helix {
        width: 100px;
        height: 150px;
    }
    
    .cell-structure {
        width: 80px;
        height: 80px;
    }
    
    .cell-nucleus {
        width: 30px;
        height: 30px;
    }
}

/* Ajustes para tablets en modo portrait */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .research-stats {
        flex-direction: row;
        justify-content: space-around;
    }
    
    .alliances-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ajustes para tablets en modo landscape */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero-section {
        min-height: 90vh;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .research-stats {
        flex-direction: row;
        gap: 2rem;
    }
}

/* Ajustes para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .product-image img,
    .alliance-item img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Ajustes para modo oscuro (si se implementa en el futuro) */
@media (prefers-color-scheme: dark) {
    /* Variables para modo oscuro se pueden agregar aquí */
}

/* Ajustes para usuarios que prefieren movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .molecule,
    .helix-strand,
    .cell-structure,
    .cell-membrane,
    .scroll-arrow,
    .microscope,
    .test-tubes,
    .dna-sequence {
        animation: none;
    }
}

/* Ajustes para contraste alto */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 3px solid var(--primary-blue);
    }
    
    .btn-outline-primary {
        border: 3px solid var(--primary-blue);
    }
    
    .nav-link {
        font-weight: 600;
    }
    
    .product-card,
    .service-card,
    .alliance-item {
        border: 2px solid var(--primary-blue);
    }
}

/* Ajustes para impresión */
@media print {
    .navbar,
    .whatsapp-float,
    .back-to-top,
    .hero-background,
    .molecules-animation {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .hero-title,
    .section-title {
        color: var(--text-dark) !important;
    }
    
    .btn {
        border: 1px solid var(--text-dark);
        background: transparent !important;
        color: var(--text-dark) !important;
    }
    
    .footer {
        background: transparent !important;
        color: var(--text-dark) !important;
    }
    
    .footer-links a,
    .contact-item a {
        color: var(--text-dark) !important;
    }
}

/* Hero Section Responsive */
@media (max-width: 768px) {
    .hero-section {
        min-height: 180vh;
    }
    
    .hero-section .container {
        padding-top: 50px;
    }
    
    .hero-title-main {
        font-size: 2rem;
    }
    
    .title-line {
        margin-bottom: 0.25rem;
    }
    
    .hero-subtitle-small {
        font-size: 0.8rem;
    }
    
    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    
    .product-showcase {
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .product-item.featured {
        transform: scale(1.05);
    }
    
    /* Estilos para productos en hero (no afectar tarjetas de productos) */
    .product-showcase .product-image {
        width: 60px;
        height: 60px;
    }
    
    .product-label {
        font-size: 0.7rem;
    }
    
    .floating-element {
        opacity: 0.05;
    }
    
    .molecule-icon, .cell-icon {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .organic-base {
        height: 150px;
    }
    
    /* Imágenes del hero */
    .corner-image {
        width: 150px;
        height: 150px;
        opacity: 0.5;
    }
    
    .hero-main-image {
        width: 700px;
        height: 800px;
        bottom: 5%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 200vh;
    }
    
    .hero-section .container {
        padding-top: 40px;
    }
    
    .hero-title-main {
        font-size: 1.6rem;
    }
    
    .hero-subtitle-small {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .cta-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .product-showcase {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    .product-item.featured {
        transform: none;
    }
    
    .product-item:hover {
        transform: translateY(-5px);
    }
    
    .product-item.featured:hover {
        transform: translateY(-5px);
    }
    
    /* Imágenes del hero */
    .corner-image {
        width: 100px;
        height: 100px;
        opacity: 0.4;
    }
    
    .corner-top-left {
        top: 2%;
        left: 1%;
    }
    
    .corner-top-right {
        top: 2%;
        right: 1%;
    }
    
    .corner-bottom-left {
        bottom: 15%;
        left: 1%;
    }
    
    .corner-bottom-right {
        bottom: 15%;
        right: 1%;
    }
    
    .hero-main-image {
        width: 90%;
        max-width: 550px;
        height: 600px;
        bottom: 3%;
    }
}

/* Productos Responsive */
@media (max-width: 992px) {
    .products-catalog .product-main-image {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .products-catalog .product-main-image {
        min-height: 350px;
    }
    
    .products-catalog .product-main-image {
        filter: brightness(1.15) contrast(1.2) saturate(1.15);
    }
    
    .product-content {
        padding: 2rem 1.5rem;
    }
    
    .product-content h3 {
        font-size: 1.4rem;
    }
    
    .contact-panel {
        width: 100%;
        right: -100%;
    }
    
    .contact-panel-content {
        padding: 70px 30px 30px;
    }
    
    .contact-panel-title {
        font-size: 1.5rem;
    }
    
    .contact-info-item {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .contact-panel-content {
        padding: 60px 20px 20px;
    }
    
    .contact-panel-title {
        font-size: 1.3rem;
    }
    
    .contact-panel-description {
        font-size: 0.9rem;
    }
    
    .contact-info-item {
        font-size: 0.95rem;
        margin-bottom: 1.25rem;
    }
    
    .social-icon-link {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
