/* ============================================================
   LAYOUT.CSS - Header, Hero, Footer, Sections, Responsive
   ============================================================ */

/* ===== HEADER ===== */
.header {
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-top {
    background: #F8F9FA;
    font-size: 13px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
}
.header-top a {
    color: var(--gray);
    transition: color 0.2s;
}
.header-top a:hover { color: var(--primary); }

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
}
.logo:hover { color: var(--primary); }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav a {
    font-weight: 500;
    color: var(--dark);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
}
.nav a:hover,
.nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-toggle {
    display: none;
    font-size: 18px;
    color: var(--dark);
    padding: 8px;
    border-radius: 6px;
    background: var(--light-gray);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(26,37,47,0.9) 0%, rgba(44,62,80,0.75) 50%, rgba(231,76,60,0.5) 100%),
        url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?w=1920&q=80') center/cover no-repeat;
    color: white;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #FAFBFC, transparent);
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: 60px 20px;
    width: 100%;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
    color: #FFE0DD;
}
.hero-badge i { color: #FFD700; }

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero-highlight {
    color: var(--primary);
    position: relative;
}
.hero-subtitle {
    font-size: 18px;
    opacity: 0.85;
    margin-bottom: 36px;
    font-weight: 400;
}

/* Search form inside hero */
.hero-search {
    background: white;
    border-radius: var(--radius-lg);
    padding: 6px 6px 16px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    max-width: 860px;
    animation: slideUp 0.6s ease;
}
.search-tabs {
    display: flex;
    gap: 4px;
    padding: 6px 6px 0;
    margin-bottom: 12px;
}
.search-tab {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
    transition: all 0.2s;
}
.search-tab.active {
    background: var(--primary-light);
    color: var(--primary);
}
.search-tab:hover { background: var(--light-gray); color: var(--dark); }

.search-form-hero { padding: 0 10px; }
.search-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}
.search-field-keyword {
    grid-column: 1 / -1;
    margin-bottom: 4px;
}
.search-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.search-field label i { margin-right: 4px; color: var(--primary); }

.search-btn-hero {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    height: 44px;
}
.search-btn-hero:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.hero-stat strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: white;
    line-height: 1;
}
.hero-stat span {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}
.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.25);
}

/* ===== SECTIONS ===== */
.section { padding: 72px 0; }
.section-gray { background: #F4F6F8; }

.section-header {
    text-align: center;
    margin-bottom: 48px;
}
.section-label {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.section-title {
    font-size: 34px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}
.section-subtitle {
    font-size: 16px;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== TYPE CARDS HOME ===== */
.type-grid-home {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}
.type-card-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 16px;
    background: white;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    box-shadow: var(--shadow);
    transition: all 0.25s ease;
    cursor: pointer;
}
.type-card-home:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}
.type-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 12px;
    transition: transform 0.25s;
}
.type-card-home:hover .type-card-icon {
    transform: scale(1.1);
}
.type-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 4px;
}
.type-card-count {
    font-size: 12px;
    font-weight: 500;
}

/* ===== WHY GRID ===== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}
.why-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.25s, box-shadow 0.25s;
}
.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.why-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.why-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}
.why-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.7;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--dark) 0%, #1a252f 50%, #922B21 100%);
    padding: 60px 0;
    color: white;
}
.cta-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.cta-text h2 {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 8px;
}
.cta-text p {
    font-size: 16px;
    opacity: 0.8;
}
.cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.btn-white {
    background: white;
    color: var(--dark);
    font-weight: 600;
}
.btn-white:hover { background: #f0f0f0; color: var(--primary); }
.btn-white-outline {
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
    font-weight: 600;
    background: transparent;
}
.btn-white-outline:hover { background: rgba(255,255,255,0.15); }

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    padding: 56px 0 24px;
    margin-top: 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-logo {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 16px;
    color: white;
}
.footer-brand p {
    color: #95A5A6;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}
.footer-social {
    display: flex;
    gap: 10px;
}
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B0BEC5;
    font-size: 14px;
    transition: all 0.2s;
}
.footer-social a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}
.footer h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}
.footer h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}
.footer a {
    display: block;
    padding: 5px 0;
    color: #95A5A6;
    font-size: 14px;
    transition: color 0.2s;
}
.footer a:hover { color: white; padding-left: 4px; }
.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 13px;
    color: #636E72;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero-title { font-size: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .search-fields { grid-template-columns: 1fr 1fr; }
    .search-btn-hero { grid-column: 1 / -1; justify-content: center; width: 100%; }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        gap: 4px;
        z-index: 999;
        border-top: 1px solid var(--border);
    }
    .nav.active { display: flex; }
    .nav a { padding: 10px 16px; width: 100%; }
    .mobile-toggle { display: flex; align-items: center; justify-content: center; }

    .hero { min-height: 480px; }
    .hero-title { font-size: 30px; }
    .hero-subtitle { font-size: 15px; }
    .hero-stats { gap: 12px; }
    .hero-stat strong { font-size: 18px; }

    .section { padding: 48px 0; }
    .section-title { font-size: 26px; }

    .type-grid-home { grid-template-columns: repeat(3, 1fr); gap: 12px; }

    .footer-grid { grid-template-columns: 1fr; gap: 28px; }

    .cta-content { flex-direction: column; text-align: center; }
    .cta-actions { justify-content: center; }

    .search-fields { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .type-grid-home { grid-template-columns: repeat(2, 1fr); }
    .hero-title { font-size: 26px; }
    .hero-stat-divider { display: none; }
}