/* Mobile First CSS - VastoMundo */
/* Base styles for mobile devices */

/* Reset and Base */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* Typography Mobile */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 1.75rem; /* 28px */
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem; /* 24px */
    margin-bottom: 0.875rem;
}

h3 {
    font-size: 1.25rem; /* 20px */
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.125rem; /* 18px */
    margin-bottom: 0.625rem;
}

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* Mobile Header */
.header {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    max-width: 150px;
}

.logo svg {
    width: 100%;
    height: auto;
    max-height: 40px;
}

/* Mobile Menu Button */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1f2937;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    pointer-events: none;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Desktop Navigation - Hidden on Mobile */
.main-nav,
.header-actions {
    display: none;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 60px);
    background: #ffffff;
    transition: left 0.3s ease;
    overflow-y: auto;
    z-index: 999;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.mobile-nav.active {
    left: 0;
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu > li {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu a {
    display: block;
    padding: 1rem;
    color: #1f2937;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.mobile-menu a:active {
    background: #f3f4f6;
}

.has-submenu {
    position: relative;
}

.has-submenu::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    transition: transform 0.3s;
}

.has-submenu.open::after {
    transform: translateY(-50%) rotate(180deg);
}

.mobile-submenu {
    display: none;
    background: #f9fafb;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu a {
    padding-left: 2rem;
    font-size: 0.9375rem;
}

/* Mobile Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 2rem 0;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: white;
}

.hero-subtitle {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 1rem;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 1rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Mobile Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    width: 100%;
    -webkit-appearance: none;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:active {
    background: #1d4ed8;
    transform: scale(0.98);
}

.btn-secondary {
    background: #64748b;
    color: white;
}

.btn-secondary:active {
    background: #475569;
    transform: scale(0.98);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Mobile Sections */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 1rem;
}

.section-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Mobile Cards */
.category-grid,
.products-grid,
.banks-grid,
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
}

.category-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 0.75rem;
    display: block;
}

.category-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Mobile Product Cards */
.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.product-card:active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    padding-top: 60%;
    background: #f3f4f6;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: auto;
    object-fit: contain;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-content {
    padding: 1.25rem;
}

.product-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.product-rating i {
    color: #f59e0b;
}

.rating-count {
    color: #6b7280;
    font-size: 0.75rem;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.product-features li {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.product-features i {
    color: #10b981;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.fee-free {
    color: #10b981;
    font-weight: 600;
    font-size: 0.875rem;
}

.fee-amount {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Mobile Bank Cards */
.bank-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.bank-card:active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.bank-logo {
    width: 100px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 0.75rem;
}

.bank-type {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.bank-name {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.bank-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.feature-item i {
    font-size: 1.25rem;
    color: #2563eb;
}

/* Mobile Blog Cards */
.blog-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
}

.blog-card:active {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.25rem;
}

.blog-category {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.75rem;
}

.blog-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.blog-card h3 a {
    color: #1f2937;
    text-decoration: none;
}

.blog-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.read-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Mobile Forms */
.newsletter-section {
    background: #f8fafc;
    padding: 2rem 1rem;
    text-align: center;
    margin: 2rem 0;
}

.newsletter-section h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.newsletter-section p {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.newsletter-form-inline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form-inline input[type="email"] {
    padding: 0.875rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
}

.newsletter-form-inline button {
    padding: 0.875rem 1.5rem;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

.newsletter-form-inline button:active {
    background: #1d4ed8;
    transform: scale(0.98);
}

/* Mobile Footer */
.footer {
    background: #1e293b;
    color: #e2e8f0;
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

.footer-content {
    padding: 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-column a:active {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 1.5rem 1rem 1rem;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    margin: 0;
    color: #94a3b8;
}

/* Mobile Utilities */
.content-ad {
    margin: 2rem 0;
    padding: 0 1rem;
    text-align: center;
}

.calculator-cta,
.article-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    border-radius: 12px;
    margin: 2rem 1rem;
}

.calculator-cta h2,
.article-cta h3 {
    color: white;
    margin-bottom: 0.75rem;
}

.calculator-cta p,
.article-cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Mobile Article Page */
.blog-article {
    padding: 1rem 0;
}

.article-header {
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.article-lead {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.article-image {
    margin: 0 -1rem 2rem;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-content {
    padding: 0 1rem;
}

.article-content h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Mobile Table of Contents */
.table-of-contents {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.table-of-contents h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.table-of-contents ol {
    margin: 0;
    padding-left: 1.5rem;
}

.table-of-contents li {
    margin-bottom: 0.75rem;
}

.table-of-contents a {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.9375rem;
}

/* Mobile Breadcrumbs */
.breadcrumbs {
    padding: 1rem;
    font-size: 0.875rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumbs a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumbs a:active {
    color: #2563eb;
}

/* Mobile Loading States */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:active {
    transform: scale(0.9);
}

/* Prevent body scroll when menu is open */
.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
    .header-container,
    .mobile-nav,
    .footer-bottom {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .mobile-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Tablet Styles (768px and up) */
@media (min-width: 768px) {
    /* Container */
    .container {
        max-width: 750px;
        padding: 0 20px;
    }
    
    /* Typography */
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    /* Header */
    .header-container {
        padding: 1rem 2rem;
    }
    
    /* Grids */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .products-grid,
    .banks-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Hero */
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-actions .btn {
        width: auto;
    }
    
    /* Newsletter */
    .newsletter-form-inline {
        flex-direction: row;
    }
    
    .newsletter-form-inline button {
        width: auto;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Styles (1024px and up) */
@media (min-width: 1024px) {
    /* Container */
    .container {
        max-width: 1024px;
    }
    
    /* Show desktop navigation */
    .mobile-menu-toggle,
    .mobile-nav {
        display: none;
    }
    
    .main-nav,
    .header-actions {
        display: flex;
    }
    
    /* Desktop Navigation */
    .main-nav ul {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        gap: 2rem;
    }
    
    .main-nav a {
        color: #1f2937;
        text-decoration: none;
        font-weight: 500;
        padding: 0.5rem 0;
        position: relative;
    }
    
    .main-nav a:hover {
        color: #2563eb;
    }
    
    /* Dropdown menus */
    .has-dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        min-width: 200px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.2s;
        z-index: 100;
    }
    
    .has-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown-menu a {
        display: block;
        padding: 0.75rem 1rem;
        color: #4b5563;
        font-weight: 400;
    }
    
    .dropdown-menu a:hover {
        background: #f3f4f6;
        color: #1f2937;
    }
    
    /* Header Actions */
    .header-actions {
        gap: 1rem;
        align-items: center;
    }
    
    /* Grids */
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .banks-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Hero */
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop (1280px and up) */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .mobile-menu-toggle,
    .btn,
    .content-ad,
    .newsletter-section,
    .scroll-to-top {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
        background: white;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: black;
        text-decoration: none;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}