/**
 * RESPONSIVE.CSS - Adaptación a Dispositivos Móviles
 * Portal Gobierno Estado La Guaira
 * Breakpoints: 1200px, 992px, 768px, 576px
 */

/* ============================================
   TABLETS GRANDES Y ESCRITORIOS PEQUEÑOS
   Max-width: 1200px
   ============================================ */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .hero-title {
        font-size: var(--font-size-4xl);
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
}

/* ============================================
   TABLETS Y DISPOSITIVOS MEDIANOS
   Max-width: 992px
   ============================================ */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    /* Header */
    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background: white;
        box-shadow: var(--shadow-xl);
        transition: left var(--transition-base);
        overflow-y: auto;
        z-index: var(--z-fixed);
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
        padding: var(--spacing-lg);
    }
    
    .nav-item a {
        padding: var(--spacing-md);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--color-bg-light);
        margin-top: var(--spacing-xs);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }
    
    .dropdown.active .dropdown-menu {
        max-height: 500px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .hero-title {
        font-size: var(--font-size-3xl);
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   MÓVILES GRANDES Y TABLETS PEQUEÑAS
   Max-width: 768px
   ============================================ */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 var(--spacing-md);
    }
    
    /* Tipografía */
    html {
        font-size: 15px;
    }
    
    h1 { font-size: var(--font-size-3xl); }
    h2 { font-size: var(--font-size-2xl); }
    h3 { font-size: var(--font-size-xl); }
    
    /* Espaciado */
    .section-padding {
        padding: var(--spacing-2xl) 0;
    }
    
    /* Header */
    .header-content {
        padding: var(--spacing-sm) 0;
    }
    
    .logo-img {
        height: 40px;
    }
    
    .user-name {
        display: none;
    }
    
    .nav-item a span {
        display: inline;
    }
    
    /* Hero */
    .hero-section {
        min-height: 500px;
        padding: var(--spacing-2xl) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-description {
        font-size: var(--font-size-base);
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Stats */
    .stats-section {
        margin-top: -30px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-xl);
    }
    
    .stat-number {
        font-size: var(--font-size-2xl);
    }
    
    /* Section Header */
    .section-header {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .section-subtitle {
        font-size: var(--font-size-base);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: var(--spacing-lg);
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: var(--font-size-2xl);
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-image {
        height: 200px;
    }
    
    /* News */
    .news-card {
        margin-bottom: var(--spacing-lg);
    }
    
    /* CTA */
    .cta-title {
        font-size: var(--font-size-2xl);
    }
    
    .cta-description {
        font-size: var(--font-size-base);
    }
    
    .cta-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-actions .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-bottom-links {
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    /* Buttons */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

/* ============================================
   MÓVILES MEDIANOS
   Max-width: 576px
   ============================================ */
@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 var(--spacing-md);
    }
    
    /* Tipografía */
    html {
        font-size: 14px;
    }
    
    /* Header */
    .main-nav {
        width: 100%;
        left: -100%;
    }
    
    .search-toggle {
        width: 36px;
        height: 36px;
    }
    
    /* Hero */
    .hero-section {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: var(--font-size-xl);
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
    }
    
    .btn-lg {
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--font-size-base);
    }
    
    /* Stats */
    .stat-number {
        font-size: var(--font-size-xl);
    }
    
    .stat-label {
        font-size: var(--font-size-xs);
    }
    
    /* Cards */
    .service-card,
    .product-card,
    .news-card {
        margin-bottom: var(--spacing-md);
    }
    
    /* Product */
    .product-footer {
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: flex-start;
    }
    
    .price-current {
        font-size: var(--font-size-lg);
    }
    
    /* Forms */
    .form-control {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    /* Modal */
    .modal {
        padding: var(--spacing-md);
    }
    
    /* Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        font-size: var(--font-size-sm);
    }
    
    /* Pagination */
    .pagination a,
    .pagination span {
        min-width: 36px;
        height: 36px;
        padding: 0 var(--spacing-sm);
        font-size: var(--font-size-sm);
    }
}

/* ============================================
   MÓVILES PEQUEÑOS
   Max-width: 400px
   ============================================ */
@media (max-width: 400px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-title {
        font-size: var(--font-size-lg);
    }
    
    .section-title {
        font-size: var(--font-size-lg);
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--font-size-sm);
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ============================================
   UTILIDADES RESPONSIVE
   ============================================ */

/* Ocultar en móvil */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Mostrar solo en móvil */
@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* Ocultar en tablet */
@media (min-width: 769px) and (max-width: 992px) {
    .hide-tablet {
        display: none !important;
    }
}

/* Ocultar en desktop */
@media (min-width: 993px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Text alignment responsive */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center !important;
    }
    
    .text-left-mobile {
        text-align: left !important;
    }
}

/* Flex direction responsive */
@media (max-width: 768px) {
    .flex-column-mobile {
        flex-direction: column !important;
    }
}

/* Width responsive */
@media (max-width: 768px) {
    .w-100-mobile {
        width: 100% !important;
    }
}