/*
Theme Name: IBANKS
Theme URI: https://ibanks.co.il
Author: HUB Advanced Systems
Author URI: https://hub.co.il
Description: Financial comparison platform - Professional WordPress Theme with RTL Support
Version: 1.6.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: Proprietary
License URI: https://ibanks.co.il/license
Text Domain: ibanks
Domain Path: /languages
Tags: rtl-language-support, financial, comparison, responsive, accessibility-ready
*/

/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    --brand-primary: #0A2540;
    --brand-accent: #00D4FF;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #F8FAFC;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    margin: 0;
    font-family: var(--font-system);
    color: var(--text-main);
    line-height: 1.6;
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

a:hover {
    opacity: 0.85;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ==========================================
   Layout & Container
   ========================================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

/* ==========================================
   Header & Navigation
   ========================================== */
.site-header {
    background: var(--brand-primary);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.site-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    gap: 20px;
}

.site-header__logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--white);
    z-index: 1001;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.site-header__logo span {
    color: var(--brand-accent);
}

.site-header__nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-header__nav a {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.site-header__nav a:hover,
.site-header__nav a:focus {
    color: var(--brand-accent);
    background: rgba(255,255,255,0.1);
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.btn-icon {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
    font-size: 1.2rem;
}

.btn-icon:hover,
.btn-icon:focus {
    background: rgba(255,255,255,0.15);
}

.btn-outline {
    border: 2px solid white;
    padding: 8px 20px;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.btn-outline:hover,
.btn-outline:focus {
    background: white;
    color: var(--brand-primary);
}

/* ==========================================
   Mobile Menu Toggle
   ========================================== */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    padding: 8px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.mobile-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: var(--transition-smooth);
    border-radius: 2px;
}

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

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

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

/* ==========================================
   Search Overlay
   ========================================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 37, 64, 0.98);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.search-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.search-overlay__close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    transition: var(--transition-fast);
    line-height: 1;
}

.search-overlay__close:hover {
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.search-overlay__input {
    background: none;
    border: none;
    border-bottom: 3px solid rgba(255,255,255,0.3);
    font-size: 2rem;
    color: white;
    text-align: center;
    width: 80%;
    max-width: 700px;
    padding: 20px;
    outline: none;
    transition: var(--transition-fast);
}

.search-overlay__input:focus {
    border-color: var(--brand-accent);
}

.search-overlay__input::placeholder {
    color: rgba(255,255,255,0.5);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    background: linear-gradient(135deg, #0A2540 0%, #0d3a5f 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero > * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.hero-search {
    background: white;
    padding: 8px;
    border-radius: 50px;
    max-width: 700px;
    margin: 30px auto;
    display: flex;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.hero-search form {
    display: flex;
    width: 100%;
}

.hero-search input {
    border: none;
    flex: 1;
    padding: 12px 25px;
    outline: none;
    font-size: 1rem;
    background: transparent;
}

.hero-search button {
    background: var(--brand-accent);
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    color: var(--brand-primary);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.hero-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,212,255,0.4);
}

/* ==========================================
   Features Section
   ========================================== */
.features-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand-accent);
}

.feature-card h3 {
    color: var(--brand-primary);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   Banks Grid
   ========================================== */
.banks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.bank-chip {
    background: white;
    border: 2px solid var(--border-color);
    padding: 20px 15px;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 600;
    color: var(--text-main);
}

.bank-chip:hover {
    border-color: var(--brand-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ==========================================
   Footer
   ========================================== */
.site-footer {
    background: var(--brand-primary);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 20px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.site-footer h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

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

.site-footer li {
    margin-bottom: 12px;
}

.site-footer a:hover {
    color: var(--brand-accent);
}

.site-footer__disclaimer {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

.site-footer__disclaimer p {
    margin: 8px 0;
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.py-60 { padding: 60px 0; }

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
    }
    
    .site-header__nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 85%;
        max-width: 350px;
        height: 100%;
        background: var(--brand-primary);
        padding: 100px 30px;
        transform: translateX(100%);
        transition: var(--transition-smooth);
        box-shadow: -5px 0 25px rgba(0,0,0,0.3);
        overflow-y: auto;
    }
    
    .site-header__nav.is-active {
        transform: translateX(0);
    }
    
    .site-header__nav ul {
        flex-direction: column;
        gap: 0;
    }
    
    .site-header__nav li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .site-header__nav a {
        display: block;
        padding: 15px 10px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-search {
        flex-direction: column;
        border-radius: 12px;
        padding: 15px;
    }
    
    .hero-search input {
        padding: 15px;
        text-align: center;
    }
    
    .hero-search button {
        margin-top: 10px;
        width: 100%;
        padding: 15px;
    }
    
    .features-section {
        padding: 50px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .search-overlay__input {
        font-size: 1.5rem;
        width: 90%;
    }
    
    .search-overlay__close {
        font-size: 2rem;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header__logo {
        font-size: 1.5rem;
    }
    
    .btn-outline {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .banks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   Accessibility
   ========================================== */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

:focus-visible {
    outline: 3px solid var(--brand-accent);
    outline-offset: 2px;
}

/* ==========================================
   Print Styles
   ========================================== */
@media print {
    .site-header,
    .site-footer,
    .hero-search,
    .search-overlay {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}
