/* ==========================================================================
   CLASSIC PREMIUM DESIGN SYSTEM - PROTOTO.EU
   ========================================================================== */

:root {
    /* Colors */
    --color-primary: #0A192F; /* Deep Navy */
    --color-secondary: #0284C7; /* Sailing Blue */
    --color-accent: #D32F2F; /* Marine Red */
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8F9FA;
    --color-text: #334155;
    --color-text-dark: #0F172A;
    --color-border: #E2E8F0;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing & Layout (8pt grid system) */
    --container-width: 1200px;
    --spacing-xs: 0.5rem; /* 8px */
    --spacing-sm: 1rem; /* 16px */
    --spacing-md: 1.5rem; /* 24px */
    --spacing-lg: 3rem; /* 48px */
    --spacing-xl: 4rem; /* 64px */

    /* Shadows & Transitions */
    --shadow-sm: 0 2px 4px rgba(10, 25, 47, 0.05), 0 1px 2px rgba(10, 25, 47, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(10, 25, 47, 0.1), 0 8px 10px -6px rgba(10, 25, 47, 0.1);
    --shadow-lg: 0 20px 40px -10px rgba(10, 25, 47, 0.15), 0 10px 20px -10px rgba(10, 25, 47, 0.1);
    --transition: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
    --transition-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
}

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

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

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.mt-xl {
    margin-top: var(--spacing-xl);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.875rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-spring);
    border: none;
    min-height: 44px; /* Touch target size min 44px */
    min-width: 44px;
}

.btn:active {
    transform: scale(0.96);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #FFF;
}

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

.btn-secondary {
    background-color: var(--color-secondary);
    color: #FFF;
}

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

.btn-outline {
    background-color: transparent;
    color: #FFF;
    border: 2px solid #FFF;
}

.btn-outline:hover {
    background-color: #FFF;
    color: var(--color-primary);
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   HEADER (STICKY NAV)
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #FFF;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    height: 80px;
}

.site-header.scrolled {
    height: 70px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
}

.nav-logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.site-header.scrolled .nav-logo {
    height: 40px;
}

.main-nav .nav-list {
    display: flex;
    gap: 2.5rem;
}

.main-nav a {
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-secondary);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px; /* Offset for header */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax effect */
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 25, 47, 0.7), rgba(10, 25, 47, 0.4));
    z-index: -1;
}

.hero-content {
    text-align: center;
    color: #FFF;
    max-width: 800px;
}

.hero-content h1 {
    font-size: 4.5rem;
    color: #FFF;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */
.about-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--color-accent);
}

.text-center.section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-image img {
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   COURSES (OFERTA)
   ========================================================================== */
.courses-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg-alt);
}

.section-desc {
    font-size: 1.2rem;
    color: var(--color-text);
    max-width: 700px;
    margin: 0 auto 4rem;
}

.category-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.5rem;
    color: var(--color-primary);
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
}

.course-card {
    background-color: #FFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-spring);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.course-card:active {
    transform: scale(0.98);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.course-img::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.5));
}

.course-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-content h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.course-content p {
    font-size: 0.95rem;
    color: #64748B;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* ==========================================================================
   MODALS (Szczegóły Kursu)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(10, 25, 47, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%);
    width: 90%;
    max-width: 700px;
    background-color: #FFF;
    border-radius: 8px;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-spring);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg-alt);
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-primary);
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
    width: 44px; /* Pro Max touch target */
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--color-accent);
    background-color: rgba(0,0,0,0.05);
}

.modal-close:active {
    transform: scale(0.9);
}

.modal-body {
    padding: 2rem;
}

.modal-body h4 {
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.modal-body li {
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */
.contact-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-list {
    margin-top: 2rem;
}

.contact-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-list strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.2rem;
}

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

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

.classic-form input,
.classic-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--color-bg-alt);
    transition: var(--transition);
}

.classic-form input:focus,
.classic-form textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0;
    text-align: center;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin: 0 auto 1.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ==========================================================================
   RESPONSIVE (MOBILE)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Nawigacja z łamaniem linii przy tablecie - wg skilla 'nav-responsywny' (hamburger na tablecie) */
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 80px; /* Wysokość headera */
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: #FFF;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        box-shadow: inset 0 10px 10px -10px rgba(0,0,0,0.1);
    }

    .site-header.scrolled .main-nav {
        top: 70px;
        height: calc(100vh - 70px);
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav .nav-list {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .main-nav a {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}
