/**
 * BIOINTE - RESPONSIVE STYLES
 * Media Queries y Breakpoints
 */

/* ==========================================
   BREAKPOINTS
   ========================================== */

/* 
  Mobile: 0-640px
  Tablet: 641px-1024px
  Desktop: 1025px+
  Large Desktop: 1440px+
*/

/* ==========================================
   LARGE DESKTOP (1440px+)
   ========================================== */

@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .feed-container {
        max-width: 1600px;
        grid-template-columns: 300px 1fr 360px;
    }
    
    .hero-title {
        font-size: 64px;
    }
    
    .section-title {
        font-size: 48px;
    }
}

/* ==========================================
   DESKTOP (1025px - 1439px)
   ========================================== */

@media (max-width: 1439px) {
    .feed-container {
        grid-template-columns: 280px 1fr 320px;
    }
}

/* ==========================================
   TABLET (768px - 1024px)
   ========================================== */

@media (max-width: 1024px) {
    /* Layout */
    .feed-container {
        grid-template-columns: 1fr;
        padding: 16px;
    }
    
    .sidebar-left,
    .sidebar-right {
        display: none;
    }
    
    /* Navigation */
    .landing-nav .container {
        height: 64px;
    }
    
    .nav-menu {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        gap: 8px;
        box-shadow: var(--shadow-xl);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu a {
        width: 100%;
        padding: 12px 16px;
        border-radius: var(--radius-md);
    }
    
    .nav-menu a:hover {
        background: var(--bg-hover);
    }
    
    .nav-actions {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .hero-title {
        font-size: 44px;
    }
    
    .hero-stats {
        gap: 32px;
    }
    
    /* Sections */
    .section-title {
        font-size: 36px;
    }
    
    /* Grids */
    .features-grid,
    .pricing-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .quick-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .footer-brand {
        grid-column: 1 / -1;
    }
    
    /* Language Selector */
    .language-selector {
        top: 80px;
        right: 16px;
    }
}

/* ==========================================
   MOBILE (641px - 767px)
   ========================================== */

@media (max-width: 767px) {
    /* Typography */
    h1 {
        font-size: 36px;
    }
    
    h2 {
        font-size: 32px;
    }
    
    h3 {
        font-size: 24px;
    }
    
    /* Hero */
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-description {
        font-size: 18px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 12px;
    }
    
    .btn-hero-primary,
    .btn-hero-video {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .stat-number {
        font-size: 28px;
    }
    
    /* Sections */
    section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-description {
        font-size: 16px;
    }
    
    /* Grids */
    .features-grid,
    .pricing-grid,
    .testimonials-grid,
    .quick-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* Cards */
    .feature-card,
    .pricing-card,
    .testimonial-card {
        padding: 32px 24px;
    }
    
    /* CTA */
    .cta-content h2 {
        font-size: 36px;
    }
    
    .cta-content p {
        font-size: 18px;
    }
    
    /* Feed */
    .stories-section {
        padding: 12px;
    }
    
    .create-post-card {
        padding: 16px;
    }
    
    .post-card {
        border-radius: var(--radius-md);
    }
    
    .post-header,
    .post-content,
    .post-stats {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .post-actions .post-action-btn {
        flex-direction: column;
        gap: 4px;
        font-size: 12px;
    }
    
    .post-actions .post-action-btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* Modals */
    .modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        max-height: 95vh;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        width: 100%;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

/* ==========================================
   SMALL MOBILE (max-width: 640px)
   ========================================== */

@media (max-width: 640px) {
    /* Container */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Navigation */
    .nav-logo {
        font-size: 20px;
    }
    
    .nav-logo img {
        width: 32px;
        height: 32px;
    }
    
    /* Hero */
    .hero-section {
        padding: 40px 0;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-description {
        font-size: 16px;
        margin-bottom: 24px;
    }
    
    .hero-cta {
        margin-bottom: 32px;
    }
    
    .btn-hero-primary,
    .btn-hero-video {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .hero-stats {
        gap: 16px;
        justify-content: space-around;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Sections */
    section {
        padding: 48px 0;
    }
    
    .section-badge {
        font-size: 11px;
        padding: 5px 14px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-description {
        font-size: 15px;
    }
    
    /* Quick Access */
    .quick-access {
        padding: 32px 0;
    }
    
    .quick-icon {
        font-size: 40px;
    }
    
    .quick-card h3 {
        font-size: 16px;
    }
    
    .quick-card p {
        font-size: 13px;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-icon {
        font-size: 40px;
        margin-bottom: 16px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
    
    .feature-card p {
        font-size: 14px;
    }
    
    /* Pricing */
    .pricing-toggle {
        flex-direction: column;
        width: 100%;
    }
    
    .toggle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .pricing-card {
        padding: 28px 20px;
    }
    
    .price {
        font-size: 48px;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 24px 20px;
    }
    
    .testimonial-text {
        font-size: 15px;
    }
    
    /* CTA */
    .cta-final {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .cta-content p {
        font-size: 16px;
    }
    
    .btn-cta-large {
        padding: 16px 32px;
        font-size: 16px;
    }
    
    /* Footer */
    .footer-main {
        padding: 60px 0 32px;
    }
    
    .footer-logo {
        font-size: 20px;
    }
    
    .footer-links h4 {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    .footer-links a {
        font-size: 14px;
    }
    
    .footer-bottom {
        padding: 20px 0;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    /* Feed */
    .feed-container {
        padding: 12px;
    }
    
    .stories-section {
        margin-bottom: 12px;
    }
    
    .story-avatar {
        width: 56px;
        height: 56px;
    }
    
    .story-item span {
        font-size: 11px;
    }
    
    .create-post-card {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    .post-avatar {
        width: 40px;
        height: 40px;
    }
    
    .create-post-input {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .create-post-actions {
        padding-top: 10px;
    }
    
    .post-action-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .post-action-btn span {
        display: none;
    }
    
    /* Post Cards */
    .posts-feed {
        gap: 12px;
    }
    
    .post-card {
        border-radius: 12px;
    }
    
    .post-header {
        padding: 12px;
    }
    
    .post-author-avatar {
        width: 40px;
        height: 40px;
    }
    
    .post-author-name {
        font-size: 15px;
    }
    
    .post-meta {
        font-size: 12px;
    }
    
    .post-content {
        padding: 0 12px 12px;
    }
    
    .post-content p {
        font-size: 14px;
    }
    
    .post-tag {
        font-size: 13px;
    }
    
    .post-stats {
        padding: 10px 12px;
    }
    
    .post-stat {
        font-size: 13px;
    }
    
    .post-actions {
        padding: 6px;
    }
    
    .post-actions .post-action-btn {
        padding: 10px 8px;
    }
    
    /* Comments */
    .post-comments {
        padding: 12px;
    }
    
    .comment-avatar {
        width: 32px;
        height: 32px;
    }
    
    .comment-header strong {
        font-size: 13px;
    }
    
    .comment-content p {
        font-size: 13px;
    }
    
    .comment-actions {
        font-size: 11px;
    }
    
    .comment-input {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .send-comment-btn {
        width: 32px;
        height: 32px;
    }
    
    /* Modals */
    .modal-header h3 {
        font-size: 20px;
    }
    
    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
    }
    
    .post-creator-avatar {
        width: 40px;
        height: 40px;
    }
    
    .post-textarea {
        min-height: 120px;
        padding: 12px;
        font-size: 15px;
    }
    
    .post-creator-actions {
        padding: 12px;
        flex-wrap: wrap;
    }
    
    .media-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .media-btn span {
        display: none;
    }
    
    /* Language Selector */
    .language-selector {
        top: 72px;
        right: 12px;
    }
    
    .lang-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .lang-dropdown {
        min-width: 160px;
    }
    
    .lang-dropdown button {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    /* Video Modal */
    .video-modal-content {
        width: 100%;
    }
    
    .video-modal-close {
        top: -35px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

/* ==========================================
   EXTRA SMALL MOBILE (max-width: 375px)
   ========================================== */

@media (max-width: 375px) {
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .cta-content h2 {
        font-size: 24px;
    }
    
    .price {
        font-size: 40px;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .stat-item {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================
   LANDSCAPE MODE (Mobile)
   ========================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .modal-content {
        max-height: 100vh;
    }
    
    .video-modal-content {
        max-width: 90vw;
        max-height: 80vh;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
    .landing-nav,
    .language-selector,
    .sidebar-left,
    .sidebar-right,
    .create-post-card,
    .stories-section,
    .mobile-menu-toggle,
    .post-actions,
    .btn-load-more,
    .footer {
        display: none !important;
    }
    
    .feed-container {
        grid-template-columns: 1fr;
    }
    
    .post-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 20px;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000;
        --text-secondary: #000;
    }
    
    .btn-outline,
    .post-action-btn {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .gradient-blob {
        animation: none !important;
    }
    
    .dashboard-mockup {
        animation: none !important;
    }
}

/* Dark Mode Preference */
@media (prefers-color-scheme: dark) {
    /* Los estilos dark mode se aplicarían aquí si implementas tema oscuro */
}