/* CSS Variables for Enhanced Color Scheme */
:root {
    --primary-blue: #3776ab;
    --python-yellow: #ffd343;
    --cpp-blue: #00599c;
    --primary-dark: #1a1a2e;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-dark: #343a40;
    --accent-gradient: linear-gradient(135deg, var(--primary-blue), var(--cpp-blue));
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 20px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.65;
    color: #333;
    background-color: #fff;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

h1 { 
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--primary-dark);
}

/* Gradient text utility - use selectively */
.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Fallback for browsers that don't support background-clip */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
    .gradient-text {
        color: var(--cpp-blue);
    }
}
h2 { 
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary-dark);
}
h3 { font-size: 1.5rem; }

p {
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
    border-color: #545b62;
}

.btn-outline {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}

.btn-outline:hover {
    background-color: #007bff;
    color: white;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Header and Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 1.5rem;
    color: #007bff;
    margin-bottom: 0;
}

.logo .tagline {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0;
}

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

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #007bff;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Hero Section Enhanced */
.hero {
    display: flex;
    align-items: center;
    min-height: 70vh;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--cpp-blue) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="10" cy="10" r="1" fill="%23ffffff" fill-opacity="0.1"/><circle cx="30" cy="30" r="1" fill="%23ffffff" fill-opacity="0.1"/><circle cx="50" cy="10" r="1" fill="%23ffffff" fill-opacity="0.1"/><circle cx="70" cy="50" r="1" fill="%23ffffff" fill-opacity="0.1"/><circle cx="90" cy="20" r="1" fill="%23ffffff" fill-opacity="0.1"/></svg>') repeat;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Optional subtle stroke for better definition */
@supports (-webkit-text-stroke: 1px black) {
    .hero-content h1 {
        -webkit-text-stroke: 0.5px rgba(0,0,0,0.3);
    }
}

/* Typewriter Effect */
.typewriter {
    border-right: 2px solid var(--python-yellow);
    padding-right: 5px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--python-yellow); }
    51%, 100% { border-color: transparent; }
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 140px;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--python-yellow);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

/* Parallax Effect */
.parallax-element {
    transition: transform 0.1s ease-out;
}

/* Section Divider */
.section-divider {
    height: 60px;
    overflow: hidden;
    line-height: 0;
    margin-top: -1px;
}

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* Code Showcase Section */
.code-showcase {
    padding: 80px 0;
    background: var(--bg-light);
}

.code-switcher {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
}

.code-tabs {
    display: flex;
    background: var(--bg-dark);
}

.code-tab {
    flex: 1;
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.code-tab.active {
    color: white;
    background: var(--primary-blue);
}

.code-tab:hover:not(.active) {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.code-content {
    position: relative;
}

.code-sample {
    display: none;
    padding: 0;
}

.code-sample.active {
    display: block;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.copy-btn {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
}

.copy-btn:hover {
    background: var(--cpp-blue);
}

.code-sample pre {
    margin: 0;
    padding: 1.5rem;
    background: #2d3748;
    color: #e2e8f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-sample code {
    color: #e2e8f0;
}

.code-output {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    font-style: italic;
    color: var(--text-light);
}

.code-output span {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.testimonial.revealed {
    opacity: 1;
    transform: translateY(0);
}

.testimonial-content {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-blue);
    box-shadow: var(--shadow-light);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-content p {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    flex-grow: 1;
}

.testimonial-author {
    margin-top: auto;
}

.testimonial-author strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Scroll Reveal Animation */
.reveal-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Features Section */
.features {
    padding: 80px 20px;
    background-color: #fff;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

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

.feature {
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.feature h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

/* Languages Section */
.languages {
    padding: 80px 20px;
    background-color: #f8f9fa;
}

.languages h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.language-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.language-card:hover {
    transform: translateY(-5px);
}

.language-card img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1rem;
}

.language-card h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

/* CTA Section */
.cta {
    padding: 80px 20px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    text-align: center;
}

.cta h2 {
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta .btn-primary {
    background-color: white;
    color: #007bff;
    border-color: white;
}

.cta .btn-primary:hover {
    background-color: #f8f9fa;
}

/* Footer */
footer {
    background-color: #333;
    color: white;
    padding: 40px 20px 20px;
}

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

.footer-section h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #333;
    color: white;
    padding: 20px;
    z-index: 2000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.cookie-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.cookie-link:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-message {
    border-radius: 5px;
    padding: 1rem;
    margin-top: 1rem;
    font-weight: 500;
}

.form-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.field-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.course-logo {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff;
}

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

/* Page Specific Styles */
.page-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 40px;
}

.content-section {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.course-card {
    background-color: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.course-card h3 {
    color: #007bff;
    margin-bottom: 1rem;
}

.course-features {
    list-style: none;
    margin: 1rem 0;
}

.course-features li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.course-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .features-grid,
    .languages-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .course-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cookie-banner,
    .cta {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}