/* ===================================
   CSS Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #53a9db;
    --dark-blue: #336ca6;
    --light-blue: #6bb9e8;
    --white: #ffffff;
    --off-white: #f8f9fa;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--dark-blue);
}

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

/* ===================================
   Navigation
   =================================== */
.navbar {
    background: var(--primary-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand a {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--dark-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: var(--primary-blue);
    border: none;
    padding: 10px;
    cursor: pointer;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
}

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

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

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

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

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(107, 185, 232, 0.3) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 3rem 2rem;
    max-width: 1000px;
}

.hero-title {
    font-size: 3rem;
    color: var(--white);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero-image {
    margin-top: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: scale(1.05);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Main Content
   =================================== */
.main-content {
    padding: 4rem 0;
    background: var(--off-white);
}

.content-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.welcome-section h2,
.content-section h2 {
    color: var(--dark-blue);
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* ===================================
   Content Cards
   =================================== */
.content-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--primary-blue);
}

.content-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.content-card.highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left-color: var(--dark-blue);
}

.content-card h3 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* ===================================
   Author Info
   =================================== */
.author-info {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-color);
}

.author-info h4 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.author-info p {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

/* ===================================
   Buttons
   =================================== */
.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--dark-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===================================
   PDF Viewer
   =================================== */
.pdf-viewer-container {
    margin-top: 2rem;
}

.pdf-viewer-container h3 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.pdf-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.pdf-viewer {
    background: var(--off-white);
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
    display: none;
}

.pdf-viewer.active {
    display: block;
}

.pdf-viewer canvas {
    max-width: 100%;
    height: auto;
    box-shadow: var(--shadow-md);
    border-radius: 4px;
}

/* ===================================
   Modal
   =================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-blue);
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    background: var(--off-white);
    color: var(--text-dark);
}

.modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.modal-body iframe {
    width: 100%;
    height: 80vh;
    border: none;
}

/* ===================================
   Contact Form
   =================================== */
.contact-form {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: 'Open Sans', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(83, 169, 219, 0.1);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
}

.form-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 2px solid #10b981;
}

.form-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid #ef4444;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--dark-blue);
    color: var(--white);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: var(--white);
}

.footer-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ===================================
   QR Code
   =================================== */
.qr-code-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background: var(--white);
    padding: 1rem;
    padding-top: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 2px solid var(--primary-blue);
    animation: fadeInUp 1s ease-out 1s both;
}

.qr-code-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.qr-code-container img {
    display: block;
    width: 120px;
    height: 120px;
    border-radius: 4px;
}

.qr-code-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 0.5rem;
    border-radius: 10px 10px 0 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    /* Hide QR code on mobile devices */
    .qr-code-container {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }

    .navbar .container {
        flex-direction: column;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-menu.active {
        max-height: 500px;
        margin-top: 1rem;
    }

    .nav-link {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .nav-link:hover,
    .nav-link.active {
        background: transparent;
    }

    .nav-link::after {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .content-card {
        padding: 1.5rem;
    }

    .pdf-controls {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body iframe {
        height: 70vh;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    .content-card,
    .author-info {
        padding: 1rem;
    }
}

/* ===================================
   Utility Classes
   =================================== */
.hidden {
    display: none !important;
}

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ===================================
   Loading Animation
   =================================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(83, 169, 219, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-blue);
    animation: spin 1s linear infinite;
}

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