/* ============================================
   CORRECCIONES RESPONSIVE - American Investment Trust
   Soluciona problemas de overflow y adaptación móvil
   ============================================ */

/* ============================================
   1. FIX EMAIL OVERFLOW (CRÍTICO)
   ============================================ */

/* Footer Email Fix */
.footer-contact-info a,
.footer-contact-info p {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    display: block !important;
    line-height: 1.5 !important;
}

/* Contact Page Email Fix */
.contact-info-content a,
.contact-info-content p {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
}

/* General Email Fix */
a[href^="mailto:"] {
    word-break: break-all !important;
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
}

/* ============================================
   2. NAVBAR RESPONSIVE
   ============================================ */

/* Mobile - Navbar */
@media (max-width: 991px) {
    .modern-navbar {
        padding: 0.75rem 0 !important;
    }
    
    .navbar-brand img {
        height: 60px !important;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 12px;
        margin-top: 1rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }
    
    .modern-nav-link {
        padding: 1rem !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .modern-nav-link:last-child {
        border-bottom: none;
    }
    
    .btn-modern-primary,
    .btn-modern-outline {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        text-align: center;
        justify-content: center;
    }
    
    .top-banner {
        font-size: 12px;
        padding: 8px 0;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 50px !important;
    }
    
    .top-banner {
        font-size: 11px;
    }
}

/* ============================================
   3. FOOTER RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .modern-footer {
        padding: 60px 0 0 !important;
        margin-top: 60px !important;
    }
    
    .footer-title {
        margin-top: 2rem;
        font-size: 1.1rem;
    }
    
    .footer-contact-item {
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .footer-contact-icon {
        width: 40px !important;
        height: 40px !important;
        margin-right: 12px !important;
    }
    
    .footer-contact-icon i {
        font-size: 1rem !important;
    }
    
    .footer-contact-info h5 {
        font-size: 0.9rem !important;
    }
    
    .footer-contact-info p,
    .footer-contact-info a {
        font-size: 0.8rem !important;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        text-align: center;
        padding: 20px 0;
    }
}

@media (max-width: 576px) {
    .modern-footer {
        padding: 40px 0 0 !important;
    }
    
    .footer-logo {
        max-width: 100px !important;
    }
    
    .footer-title {
        font-size: 1rem;
    }
    
    .footer-contact-info a {
        font-size: 0.75rem !important;
        word-break: break-all !important;
    }
    
    .footer-link {
        font-size: 0.9rem;
    }
}

/* ============================================
   4. LOGIN PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .login-wrapper {
        flex-direction: column !important;
    }
    
    .login-image-section {
        padding: 3rem 2rem !important;
        min-height: 300px !important;
    }
    
    .login-form-section {
        padding: 3rem 2rem !important;
    }
    
    .login-title {
        font-size: 2rem !important;
    }
    
    .login-image-icon {
        width: 100px !important;
        height: 100px !important;
        font-size: 2.5rem !important;
    }
}

@media (max-width: 576px) {
    .login-page {
        padding: 50px 15px !important;
    }
    
    .login-form-section {
        padding: 2rem 1.5rem !important;
    }
    
    .login-title {
        font-size: 1.75rem !important;
    }
    
    .login-subtitle {
        font-size: 1rem !important;
    }
    
    .form-options {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .btn-login {
        font-size: 1rem !important;
    }
    
    .support-info {
        padding: 1rem !important;
    }
    
    .support-info p {
        font-size: 0.85rem !important;
    }
}

/* ============================================
   5. CONTACT PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .contact-section {
        padding: 80px 0 !important;
    }
    
    .contact-info-card,
    .contact-form-card {
        padding: 2rem !important;
        margin-bottom: 2rem;
    }
    
    .page-header {
        padding: 80px 0 60px !important;
    }
}

@media (max-width: 768px) {
    .contact-section {
        padding: 60px 0 !important;
    }
    
    .page-title {
        font-size: 2.5rem !important;
    }
    
    .contact-info-item {
        flex-direction: row !important;
        align-items: flex-start !important;
    }
    
    .contact-info-icon {
        margin-right: 1rem !important;
    }
    
    .map-section {
        margin-top: 60px !important;
    }
    
    .map-section iframe {
        height: 400px !important;
    }
}

@media (max-width: 576px) {
    .contact-info-card,
    .contact-form-card {
        padding: 1.5rem !important;
    }
    
    .page-title {
        font-size: 2rem !important;
    }
    
    .contact-info-header h2 {
        font-size: 1.5rem !important;
    }
    
    .form-control-modern {
        padding: 0.875rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
    
    .btn-submit {
        font-size: 1rem !important;
        padding: 0.875rem !important;
    }
    
    .map-section iframe {
        height: 300px !important;
    }
}

/* ============================================
   6. ABOUT PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .about-hero {
        padding: 80px 0 60px !important;
    }
    
    .content-section {
        padding: 80px 0 !important;
    }
    
    .stats-banner {
        padding: 60px 0 !important;
        margin: 60px 0 !important;
    }
    
    .about-content {
        padding: 2rem 0 !important;
        text-align: center;
    }
    
    .about-image-wrapper {
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: 60px 0 40px !important;
    }
    
    .content-section {
        padding: 60px 0 !important;
    }
    
    .about-content h2 {
        font-size: 1.75rem !important;
    }
    
    .about-content p {
        font-size: 1rem !important;
    }
    
    .stat-number-large {
        font-size: 3rem !important;
    }
    
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    .map-section-about {
        padding: 60px 0 !important;
        margin-top: 60px !important;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.75rem !important;
    }
    
    .about-content h2 {
        font-size: 1.5rem !important;
    }
    
    .stat-item-large {
        padding: 1.5rem !important;
    }
    
    .stat-number-large {
        font-size: 2.5rem !important;
    }
    
    .stat-label-large {
        font-size: 1rem !important;
    }
    
    .service-item {
        padding: 1.5rem !important;
    }
}

/* ============================================
   7. INDEX (HOME) PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .hero-section {
        min-height: 70vh !important;
        padding: 80px 0 60px !important;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .hero-buttons .btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto !important;
        padding: 60px 0 40px !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 2rem !important;
    }
    
    .stats-section {
        padding: 60px 0 !important;
    }
    
    .stat-item {
        margin-bottom: 2rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   8. DASHBOARD PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .dashboard-hero {
        padding: 80px 0 60px !important;
    }
    
    .dashboard-welcome h1 {
        font-size: 2rem !important;
    }
    
    .quick-actions {
        flex-direction: column !important;
        width: 100% !important;
    }
    
    .btn-action {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .balance-cards {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .dashboard-hero {
        padding: 60px 0 40px !important;
    }
    
    .dashboard-welcome {
        text-align: center !important;
    }
    
    .dashboard-welcome h1 {
        font-size: 1.75rem !important;
    }
    
    .info-card {
        padding: 1rem !important;
    }
    
    .info-label {
        font-size: 0.85rem !important;
    }
    
    .info-value {
        font-size: 0.95rem !important;
    }
}

@media (max-width: 576px) {
    .dashboard-welcome h1 {
        font-size: 1.5rem !important;
    }
    
    .balance-card {
        padding: 1.5rem !important;
    }
    
    .balance-amount {
        font-size: 1.75rem !important;
    }
}

/* ============================================
   9. FAQ PAGE RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .faq-page-one {
        padding: 80px 0 !important;
    }
    
    .faq-search-box {
        margin-bottom: 3rem;
    }
}

@media (max-width: 768px) {
    .faq-page-one {
        padding: 60px 0 !important;
    }
    
    .accordion-box {
        margin-bottom: 2rem;
    }
    
    .acc-btn h3 {
        font-size: 1rem !important;
    }
    
    .faq-search-box__inner input {
        font-size: 0.95rem !important;
    }
}

/* ============================================
   10. BREADCRUMB RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .breadcrumb-area {
        padding: 2rem 1rem !important;
    }
    
    .breadcrumb-area-bg {
        left: 1rem !important;
        right: 1rem !important;
        bottom: 1rem !important;
    }
    
    .breadcrumb-area .inner-content {
        padding: 100px 0 50px !important;
    }
    
    .breadcrumb-area .title h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 768px) {
    .breadcrumb-area {
        padding: 1rem !important;
    }
    
    .breadcrumb-area .inner-content {
        padding: 80px 0 40px !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
    
    .breadcrumb-area .title {
        width: 100% !important;
        text-align: center !important;
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
    }
    
    .breadcrumb-area .title h2 {
        font-size: 1.75rem !important;
    }
    
    .breadcrumb-menu {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    .breadcrumb-menu ul li {
        font-size: 0.9rem !important;
    }
}

@media (max-width: 576px) {
    .breadcrumb-area .title h2 {
        font-size: 1.5rem !important;
    }
    
    .breadcrumb-menu ul li {
        font-size: 0.85rem !important;
    }
}

/* ============================================
   11. GENERAL RESPONSIVE IMPROVEMENTS
   ============================================ */

/* Contenedores */
@media (max-width: 1400px) {
    .container {
        max-width: 1140px !important;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px !important;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px !important;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Botones Generales */
@media (max-width: 576px) {
    .btn {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .btn i {
        font-size: 0.85rem !important;
    }
}



/* Prevenir overflow horizontal */
body {
    overflow-x: hidden !important;
}

* {
    max-width: 100%;
}

/* Fix para tablas responsive */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
    }
}

/* ============================================
   12. UTILIDADES RESPONSIVE
   ============================================ */

/* Ocultar en mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Mostrar solo en mobile */
@media (min-width: 769px) {
    .show-mobile {
        display: none !important;
    }
}

/* Espaciado reducido en mobile */
@media (max-width: 768px) {
    .mt-100, .pt-100 {
        margin-top: 60px !important;
        padding-top: 60px !important;
    }
    
    .mb-100, .pb-100 {
        margin-bottom: 60px !important;
        padding-bottom: 60px !important;
    }
}

@media (max-width: 576px) {
    .mt-100, .pt-100 {
        margin-top: 40px !important;
        padding-top: 40px !important;
    }
    
    .mb-100, .pb-100 {
        margin-bottom: 40px !important;
        padding-bottom: 40px !important;
    }
}

/* ============================================
   13. BACK TO TOP BUTTON RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .back-to-top {
        width: 45px !important;
        height: 45px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    .back-to-top i {
        font-size: 1rem !important;
    }
}

/* ============================================
   14. FORM ELEMENTS RESPONSIVE
   ============================================ */

@media (max-width: 576px) {
    .form-control,
    .form-input-modern,
    .form-control-modern {
        font-size: 16px !important; /* Previene zoom en iOS */
        padding: 0.875rem 1rem !important;
    }
    
    .form-label,
    .form-label-modern {
        font-size: 0.9rem !important;
    }
    
    textarea.form-control,
    textarea.form-control-modern {
        min-height: 120px !important;
    }
}

/* ============================================
   15. ANIMATION RESPONSIVE
   ============================================ */

/* Reducir animaciones en mobile */
@media (max-width: 768px) {
    [data-aos] {
        transition-duration: 0.4s !important;
    }
}

/* Deshabilitar animaciones en dispositivos lentos */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   FIN DE CORRECCIONES RESPONSIVE
   ============================================ */