/* Global Responsive Styles for All Pages */

/* Base Variables */
:root {
    --primary-color: #FFD600;
    --secondary-color: #1A4B8C;
    --accent-color: #E63946;
    --text-color: #333333;
    --light-bg: #F5F5F5;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, var(--secondary-color) 0%, #2A5BA8 100%);
}

/* Global Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Typography - Mobile First */
html {
    font-size: 16px;
}

body {
    font-family: 'Arial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Section Padding */
.section {
    padding: 40px 0;
}

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

@media (min-width: 992px) {
    .section {
        padding: 80px 0;
    }
}

/* Headings Responsive */
h1 {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.2;
}

h2 {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.3;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

@media (min-width: 992px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
}

/* Grid System - Mobile First */
.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

.grid-4 {
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .grid-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .grid {
        gap: 30px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Card Components */
.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

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

.card-content {
    padding: 20px;
}

@media (min-width: 768px) {
    .card-image {
        height: 250px;
    }
    
    .card-content {
        padding: 30px;
    }
}

/* Buttons - Mobile Optimized */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    min-height: 44px; /* Touch target */
    line-height: 1.5;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #0F3460;
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent-color);
    color: var(--white);
}

.btn-accent:hover {
    background: #C53030;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .btn {
        padding: 15px 35px;
        font-size: 1rem;
    }
}

/* Hero Sections */
.hero-section {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    overflow: hidden;
    margin-top: -80px;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 40px 20px;
}

@media (min-width: 768px) {
    .hero-section {
        min-height: 500px;
    }
    
    .hero-content {
        padding: 60px 20px;
    }
}

@media (min-width: 992px) {
    .hero-section {
        min-height: 600px;
    }
}

/* Forms - Mobile Optimized */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    min-height: 44px; /* Touch target */
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

@media (min-width: 768px) {
    .form-control {
        padding: 15px 20px;
    }
}

/* Tables - Responsive */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px;
    padding: 0 15px;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

@media (min-width: 768px) {
    .table-wrapper {
        margin: 0;
        padding: 0;
    }
}

/* Images - Responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Video Responsive */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* FAQ Accordion - Mobile Optimized */
.faq-item {
    background: var(--white);
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
    min-height: 60px; /* Touch target */
}

.faq-question:hover {
    background: var(--light-bg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

@media (min-width: 768px) {
    .faq-item {
        margin-bottom: 20px;
    }
    
    .faq-question {
        padding: 25px;
    }
    
    .faq-answer {
        padding: 0 25px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 25px 25px;
    }
}

/* Modal/Overlay - Mobile Optimized */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px 20px;
}

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

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
    }
    
    h1 {
        font-size: 20pt;
    }
    
    h2 {
        font-size: 16pt;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.pt-1 { padding-top: 10px; }
.pt-2 { padding-top: 20px; }
.pt-3 { padding-top: 30px; }
.pt-4 { padding-top: 40px; }

.pb-1 { padding-bottom: 10px; }
.pb-2 { padding-bottom: 20px; }
.pb-3 { padding-bottom: 30px; }
.pb-4 { padding-bottom: 40px; }

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }
    
    .d-md-block {
        display: block !important;
    }
    
    .d-md-flex {
        display: flex !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn,
    .form-control,
    .faq-question {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Landscape Mobile Adjustments */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        min-height: 300px;
    }
    
    .hero-content {
        padding: 30px 20px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}