/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-dark: #111827;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========================================
   Header Styles
   ======================================== */
.site-header {
    position: sticky;
    top: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover,
.logo:focus {
    color: var(--primary-dark);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Desktop Navigation */
.main-nav {
    display: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary-color);
    outline: none;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hamburger Menu */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    z-index: 1001;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--primary-color);
    padding-left: 0.5rem;
    outline: none;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2rem 1.5rem;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(16, 185, 129, 0.6));
}

.hero-container {
    max-width: 1138px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.hero-text {
    animation: fadeSlideUp 1s ease-out;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.wave {
    display: inline-block;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(20deg); }
    75% { transform: rotate(-20deg); }
}

.hero-subheading {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 2rem;
    opacity: 0.95;
    min-height: 1.5em;
}

.cta-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--white);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.cta-button:hover,
.cta-button:focus {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Profile Image */
.hero-image {
    animation: fadeSlideUp 1s ease-out 0.3s both;
}

.profile-image-wrapper {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: borderPulse 3s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 0 10px rgba(255, 255, 255, 0);
    }
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Animations */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: 4rem 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
}

.section-intro {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}

/* About Section */
.about-section {
    background-color: var(--bg-light);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ========================================
   Video Carousel
   ======================================== */
.videos-section {
    background-color: var(--white);
}

.carousel-wrapper {
    position: relative;
    margin-top: 2rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    gap: 1.5rem;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.video-card {
    background-color: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Carousel Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 10;
    color: var(--text-dark);
}

.carousel-btn:hover,
.carousel-btn:focus {
    background-color: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pagination Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot:hover,
.carousel-dot:focus {
    background-color: var(--primary-color);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    transform: scale(1.2);
}

.carousel-dot.active {
    background-color: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

/* ========================================
   Recent Shorts Section
   ======================================== */
.shorts-section {
    background-color: var(--bg-light);
}

/* Shorts-specific styles */
.shorts-wrapper {
    padding-bottom: 177.78%; /* 9:16 Aspect Ratio for YouTube Shorts (vertical) */
    max-width: 240px; /* Limit maximum width for shorts */
    margin: 0 auto; /* Center the shorts */
}

.shorts-card {
    max-width: 240px;
    margin: 0 auto;
}

.shorts-title {
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
}

/* Shorts carousel - show more items since they're narrower */
.shorts-carousel-wrapper .carousel-slide {
    min-width: 100%;
}

.shorts-carousel-track {
    gap: 0.75rem; /* Smaller gap for shorts */
}

/* ========================================
   AI Tools Section
   ======================================== */
.ai-tools-section {
    background-color: var(--bg-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.tool-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    opacity: 0;
    transform: translateY(30px);
}

.tool-card.visible {
    animation: fadeUp 0.6s ease-out forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.tool-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 0.5rem;
}

.tool-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.tool-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    background-color: var(--white);
    text-align: center;
}

.contact-text {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 3rem 1.5rem 1.5rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-links {
    list-style: none;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.footer-link:hover,
.footer-link:focus {
    color: var(--white);
    padding-left: 0.5rem;
    outline: none;
}

/* Social Links */
.social-links {
    list-style: none;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-link {
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover,
.social-link:focus {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Newsletter Form */
.newsletter-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.newsletter-form {
    margin-top: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-input {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.newsletter-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.newsletter-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.newsletter-input:valid:not(:placeholder-shown) {
    border-color: var(--secondary-color);
}

.newsletter-btn {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 0.375rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-btn:hover,
.newsletter-btn:focus {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.form-message {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    display: none;
}

.form-message.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.form-message.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid #ef4444;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover,
.back-to-top:focus {
    background-color: var(--primary-dark);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* ========================================
   Tablet Styles (768px and up)
   ======================================== */
@media (min-width: 768px) {
    .header-container {
        padding: 1.25rem 2rem;
    }
    
    .main-nav {
        display: block;
        right: 32px;
        position: absolute;
    }
    
    .hamburger {
        display: none;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subheading {
        font-size: 1.5rem;
    }
    
    .hero-content {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }
    
    .profile-image-wrapper {
        width: 250px;
        height: 250px;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .carousel-slide {
        min-width: calc(50% - 0.75rem);
    }
    
    /* Shorts carousel - show 2 on tablet */
    .shorts-carousel-wrapper .carousel-slide {
        min-width: calc(50% - 0.5rem);
    }
    
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-group {
        flex-direction: row;
    }
    
    .newsletter-input {
        flex: 1;
    }
    
    .newsletter-btn {
        flex-shrink: 0;
    }
}

/* ========================================
   Desktop Styles (1024px and up)
   ======================================== */
@media (min-width: 1024px) {
    .header-container {
        padding: 1.5rem 2rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subheading {
        font-size: 1.75rem;
    }
    
    .hero-content {
        gap: 4rem;
    }
    
    .profile-image-wrapper {
        width: 300px;
        height: 300px;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    section {
        padding: 5rem 2rem;
    }
    
    .carousel-slide {
        min-width: calc(33.333% - 1rem);
    }
    
    /* Shorts carousel - show 3 on desktop since they're narrower */
    .shorts-carousel-wrapper .carousel-slide {
        min-width: calc(33.333% - 0.5rem);
    }
    
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    /* Shorts carousel - show 4 on large screens */
    .shorts-carousel-wrapper .carousel-slide {
        min-width: calc(25% - 0.45rem);
    }
}

/* ========================================
   Accessibility Improvements
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Visible for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

