/* ===================================
   Analytics Playground - Global Styles
   =================================== */

/* CSS Variables */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #fbbc04;
    --text-dark: #202124;
    --text-light: #5f6368;
    --bg-light: #f8f9fa;
    --border-color: #dadce0;
    --error-color: #ea4335;
    --success-color: #34a853;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
    --shadow-lg: 0 2px 6px 2px rgba(60,64,67,.15), 0 8px 24px 4px rgba(60,64,67,.15);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* ===================================
   Header & Navigation
   =================================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: var(--bg-light);
}

/* ===================================
   Buttons
   =================================== */
.cta-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.cta-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.cta-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.cta-header {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   Sections
   =================================== */
.section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.page-header {
    background-color: var(--bg-light);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* ===================================
   Features Grid
   =================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
}

/* ===================================
   Carousel
   =================================== */
.carousel-section {
    position: relative;
}

.carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: none;
}

.carousel-slide.active {
    display: block;
}

.carousel-placeholder {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    font-weight: 600;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    z-index: 10;
}

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

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: var(--primary-color);
    width: 32px;
    border-radius: 6px;
}

/* ===================================
   Video Section
   =================================== */
.video-container {
    max-width: 800px;
    margin: 0 auto;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

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

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

.resource-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.resource-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.resource-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.resource-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.download-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.download-link:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

/* ===================================
   Newsletter
   =================================== */
.newsletter {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d8e47 100%);
    color: var(--white);
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
}

.newsletter-success {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.newsletter-success.show {
    display: block;
}

/* ===================================
   Services
   =================================== */
.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

.service-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

.service-features li::before {
    content: '✓ ';
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ===================================
   Pricing
   =================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    transition: var(--transition);
}

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

.pricing-card.featured {
    border: 2px solid var(--primary-color);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 1rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
}

/* ===================================
   About
   =================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

.about-image .image-placeholder {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 600;
}

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

.mission-card {
    text-align: center;
    padding: 2rem;
}

.mission-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.mission-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.mission-card p {
    color: var(--text-light);
}

.features-list {
    max-width: 600px;
    margin: 0 auto;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.75rem 0;
    font-size: 1.125rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

/* ===================================
   Contact
   =================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
}

.contact-text h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.contact-text p,
.contact-text a {
    color: var(--text-light);
    text-decoration: none;
}

.contact-text a:hover {
    color: var(--primary-color);
}

.social-connect h4 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-form-wrapper {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.contact-form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.contact-form-success.show {
    display: block;
}

.contact-form-success h3 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

/* ===================================
   Forms
   =================================== */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-error {
    display: none;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-error.show {
    display: block;
}

/* ===================================
   FAQ
   =================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.faq-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.faq-item p {
    color: var(--text-light);
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background-color: var(--bg-light);
}

.cta-box {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 4rem 2rem;
    border-radius: 12px;
    text-align: center;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-box p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-link:hover {
    opacity: 1;
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.social-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

/* ===================================
   Modals
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem;
}

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

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

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

.modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.modal-content > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem 0;
}

.form-success.show {
    display: block;
}

.form-success h3 {
    color: var(--success-color);
    margin-bottom: 0.5rem;
}

/* ===================================
   Search Modal
   =================================== */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    padding: 2rem;
}

.search-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5rem;
}

.search-modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
    transition: var(--transition);
}

.search-close:hover {
    color: var(--text-dark);
}

.search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-results {
    color: var(--text-light);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }
    
    .hero-cta-group {
        flex-direction: column;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

