/* ================================
   Device Activity Tracker - Styles
   ================================ */

/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #8b5cf6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-dark: #111827;
    --border-color: #e5e7eb;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

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

ul {
    list-style: none;
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

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

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

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-color);
}

.btn-secondary:hover {
    background-color: var(--border-color);
}

.btn-block {
    width: 100%;
}

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

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
}

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

.logo-icon {
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 15px;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.hero .btn-primary:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-3px);
}

/* Tracker Section */
.tracker-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.tracker-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}

.tracker-container {
    max-width: 600px;
    margin: 0 auto;
}

/* Embedded Tracker App (iframe) */
.tracker-embed-container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.tracker-iframe {
    width: 100%;
    height: 800px;
    border: none;
    display: block;
}

@media (max-width: 768px) {
    .tracker-iframe {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .tracker-iframe {
        height: 500px;
    }
}

.tracker-app {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

.tracker-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.tracker-results {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    display: none;
}

.tracker-results.active {
    display: block;
}

.educational-notice {
    margin-top: 30px;
    padding: 20px;
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-color);
    border-radius: var(--radius-sm);
}

.educational-notice p {
    color: #92400e;
    font-size: 0.9rem;
}

/* Features Section */
.features-section {
    padding: 100px 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

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

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* How It Works Section */
.how-it-works-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.how-it-works-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.steps-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 50px;
}

.step {
    flex: 1;
    max-width: 300px;
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

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

/* FAQ Section */
.faq-section {
    padding: 100px 0;
}

.faq-section h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 10px;
}

.faq-container {
    max-width: 800px;
    margin: 50px auto 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
}

.faq-question {
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding-bottom: 20px;
    color: var(--text-light);
    line-height: 1.7;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.25rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

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

.cta-section .btn-primary:hover {
    background-color: var(--bg-secondary);
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: white;
}

.footer-col p {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: #9ca3af;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid #374151;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Page Header (for subpages) */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
}

/* Content Section (for subpages) */
.content-section {
    padding: 60px 0;
}

.content-container {
    max-width: 800px;
    margin: 0 auto;
}

.content-container h2 {
    font-size: 1.5rem;
    margin: 40px 0 15px;
    color: var(--text-color);
}

.content-container h2:first-child {
    margin-top: 0;
}

.content-container p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.8;
}

.content-container ul {
    margin: 15px 0 15px 20px;
    list-style: disc;
}

.content-container li {
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.7;
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    margin: 0 auto;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form textarea {
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Alert Box */
.alert {
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.alert-warning {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary-color);
    color: #1e40af;
}

/* Responsive Design */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-container {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links a {
        display: block;
        padding: 15px 0;
    }

    .hero {
        padding: 120px 0 80px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps-container {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tracker-app {
        padding: 25px;
    }
}

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

    .section-title,
    .features-section h2,
    .how-it-works-section h2,
    .faq-section h2,
    .cta-section h2 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 10px 20px;
    }

    .btn-large {
        padding: 14px 28px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}
