/* ===================================
   HarborOne Banking Landing Page
   Responsive Stylesheet
   =================================== */

/* ===================================
   Tablet (768px - 1023px)
   =================================== */
@media screen and (max-width: 1023px) {
    /* Typography */
    :root {
        --h1-size: 40px;
        --h2-size: 32px;
        --h3-size: 22px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 44px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .about-image {
        order: -1;
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Benefits */
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    /* Security */
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    /* Who For */
    .who-for-content {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Contact Page */
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ===================================
   Mobile (320px - 767px)
   =================================== */
@media screen and (max-width: 767px) {
    /* Typography */
    :root {
        --h1-size: 32px;
        --h2-size: 28px;
        --h3-size: 20px;
        --body-size: 15px;
        --spacing-lg: 32px;
        --spacing-xl: 48px;
    }
    
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .navbar {
        padding: var(--spacing-sm) 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: var(--white);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-normal);
        align-items: flex-start;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--medium-gray);
    }
    
    .btn-nav {
        width: 100%;
        text-align: center;
        margin-top: var(--spacing-sm);
    }
    
    /* Hero */
    .hero {
        min-height: 500px;
        padding: var(--spacing-lg) 0;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-benefits {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .hero-benefits li {
        font-size: 16px;
    }
    
    /* About Section */
    .about {
        padding: var(--spacing-lg) 0;
    }
    
    /* Features */
    .features {
        padding: var(--spacing-lg) 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-image img {
        height: 180px;
    }
    
    /* Benefits */
    .benefits {
        padding: var(--spacing-lg) 0;
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
    }
    
    /* Security */
    .security {
        padding: var(--spacing-lg) 0;
    }
    
    /* Who For */
    .who-for {
        padding: var(--spacing-lg) 0;
    }
    
    /* Contact Form */
    .contact-form {
        padding: var(--spacing-lg) 0;
    }
    
    .form-wrapper {
        padding: var(--spacing-md);
    }
    
    /* Buttons */
    .btn-large {
        padding: 14px 30px;
        font-size: 16px;
        width: 100%;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    /* Cookie Banner */
    .cookie-banner {
        padding: var(--spacing-sm);
    }
    
    .cookie-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    /* Scroll to Top */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
    
    /* Legal Pages */
    .legal-page {
        padding: var(--spacing-lg) 0;
    }
    
    .legal-page h1 {
        font-size: 28px;
    }
    
    .legal-section {
        margin-bottom: var(--spacing-md);
    }
    
    /* Cookie Table */
    .cookie-table {
        font-size: var(--small-size);
    }
    
    .cookie-table th,
    .cookie-table td {
        padding: var(--spacing-xs);
    }
    
    /* Thank You Page */
    .thank-you-page {
        min-height: 70vh;
        padding: var(--spacing-lg) 0;
    }
    
    .thank-you-container {
        padding: var(--spacing-md);
    }
    
    .thank-you-container h1 {
        font-size: 28px;
    }
    
    /* Contact Page */
    .contact-page {
        padding: var(--spacing-lg) 0;
    }
    
    .contact-method {
        margin-bottom: var(--spacing-md);
    }
    
    .contact-form-section {
        padding: var(--spacing-md);
    }
}

/* ===================================
   Small Mobile (320px - 479px)
   =================================== */
@media screen and (max-width: 479px) {
    /* Typography */
    :root {
        --h1-size: 28px;
        --h2-size: 24px;
        --h3-size: 18px;
    }
    
    /* Hero */
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: var(--spacing-md);
    }
    
    /* Security Items */
    .security-item {
        padding: var(--spacing-md);
    }
    
    /* Form */
    .form-wrapper {
        padding: var(--spacing-sm);
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px;
        font-size: 15px;
    }
}

/* ===================================
   Large Desktop (1440px+)
   =================================== */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 64px;
    }
    
    .hero-subtitle {
        font-size: 24px;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .navbar,
    .cookie-banner,
    .scroll-to-top,
    .contact-form,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
    
    .hero {
        background: none;
        color: #000;
        min-height: auto;
    }
    
    .hero-overlay {
        display: none;
    }
    
    .hero-title,
    .hero-subtitle {
        color: #000;
    }
}

/* ===================================
   Accessibility Improvements
   =================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0066CC;
        --primary-dark: #000066;
        --text-gray: #000000;
    }
    
    .btn-primary {
        border: 2px solid var(--white);
    }
    
    .feature-card,
    .security-item {
        border: 2px solid var(--dark-gray);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* Note: Dark mode is optional and can be implemented if needed */
    /* Currently maintaining light theme for banking trust and clarity */
}

/* ===================================
   Landscape Orientation (Mobile)
   =================================== */
@media screen and (max-width: 767px) and (orientation: landscape) {
    .hero {
        min-height: 400px;
    }
    
    .hero-benefits {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   Touch Device Optimizations
   =================================== */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn,
    .nav-link,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Remove hover effects on touch devices */
    .feature-card:hover,
    .btn-primary:hover {
        transform: none;
    }
    
    /* Improve form inputs for touch */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ===================================
   Specific Device Breakpoints
   =================================== */

/* iPhone SE */
@media screen and (max-width: 375px) {
    .hero-title {
        font-size: 26px;
    }
    
    .container {
        padding: 0 12px;
    }
}

/* iPad */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Pro */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .container {
        max-width: 1000px;
    }
}
