/* ============================================
   RitmoWeb - Modern Responsive CSS
   ============================================ */

/* CSS Variables */
:root {
    --color-primary: #2563eb;
    --color-primary-dark: #1e40af;
    --color-secondary: #7c3aed;
    --color-accent: #06b6d4;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
    --color-bg-dark: #111827;
    --color-border: #e5e7eb;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;

    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Inter', var(--font-primary);

    --container-max: 1200px;
    --container-padding: 1.5rem;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --box-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    --transition-speed: 0.3s;
}

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

*::before, *::after {
    pointer-events: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

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

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

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

ul, ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Header */
.header {
    background: var(--color-bg);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.logo-text {
    display: none;
}

.nav-list {
    display: none;
    list-style: none;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-speed);
    pointer-events: none;
}

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all var(--transition-speed);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85), rgba(124, 58, 237, 0.85));
    pointer-events: none;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 0;
}

.hero h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-lead {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-decoration: none;
}

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

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

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

.btn-secondary:hover {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--color-text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Page Hero */
.page-hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-hero h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Services Grid */
.services {
    background: var(--color-bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 32px;
    height: 32px;
}

.service-card h3 {
    margin-bottom: 1rem;
}

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

.service-link {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover {
    gap: 0.75rem;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

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

.team-photo {
    width: 200px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: var(--box-shadow-lg);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-member h3 {
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-bio {
    color: var(--color-text-light);
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    text-align: center;
}

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

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
}

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

/* Contact Form */
.contact-form-wrapper h2 {
    margin-bottom: 0.5rem;
}

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

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color var(--transition-speed);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
}

.form-message {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: var(--color-success);
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: var(--color-error);
    display: block;
}

/* Contact Info */
.contact-info-wrapper h2 {
    margin-bottom: 2rem;
}

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

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--color-bg-light);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}

.contact-info-item h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.contact-info-item p {
    color: var(--color-text-light);
    margin: 0;
}

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

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

.social-link {
    width: 44px;
    height: 44px;
    background: var(--color-bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    transition: all var(--transition-speed);
}

.social-link:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
}

/* Map Section */
.map-section {
    padding: 0;
}

.map-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0 var(--container-padding);
}

.map-wrapper {
    width: 100%;
    height: 450px;
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Blog Section */
.blog-section {
    padding: 4rem 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all var(--transition-speed);
}

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

.blog-card-link {
    display: block;
    color: inherit;
}

.blog-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.blog-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.blog-category {
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.blog-card h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

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

.read-more {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* Article Page */
.article-page {
    padding: 4rem 0;
}

.article-container {
    max-width: 800px;
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-lead {
    font-size: 1.25rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.article-image {
    margin: 2rem 0;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-border);
}

.article-author-bio {
    background: var(--color-bg-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 3rem;
}

.article-author-bio h3 {
    margin-bottom: 1rem;
}

.article-related h3 {
    margin-bottom: 1.5rem;
}

.related-articles {
    display: grid;
    gap: 1rem;
}

.related-article-card {
    padding: 1.5rem;
    background: white;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    transition: all var(--transition-speed);
}

.related-article-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--box-shadow-md);
}

.related-article-card h4 {
    margin-bottom: 0.5rem;
}

.related-article-card span {
    color: var(--color-primary);
    font-weight: 600;
}

.article-cta {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    text-align: center;
    border-radius: var(--border-radius-lg);
}

.article-cta h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.article-cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Newsletter Section */
.newsletter-section {
    background: var(--color-bg-light);
    padding: 4rem 0;
    text-align: center;
}

.newsletter-content h2 {
    margin-bottom: 1rem;
}

.newsletter-content p {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}

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

.newsletter-form input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

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

/* About Page */
.about-content {
    padding: 4rem 0;
}

.about-intro {
    max-width: 900px;
    margin: 0 auto 4rem;
}

.about-intro h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.about-mission {
    margin-bottom: 4rem;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.mission-card {
    background: var(--color-bg-light);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--color-primary);
}

.mission-card h3 {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.about-approach {
    margin-bottom: 4rem;
}

.about-approach h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.approach-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.approach-item {
    display: flex;
    gap: 1.5rem;
}

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

.approach-item h3 {
    margin-bottom: 0.5rem;
}

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

.about-why,
.about-technologies {
    margin-bottom: 4rem;
}

.about-why h2,
.about-technologies h2 {
    margin-bottom: 2rem;
}

.why-list {
    list-style: none;
    padding: 0;
}

.why-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-border);
}

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

.why-list strong {
    color: var(--color-primary);
}

/* Legal Pages */
.legal-content {
    padding: 4rem 0;
}

.legal-text {
    max-width: 900px;
    margin: 0 auto;
}

.legal-text h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.legal-text h2:first-child {
    margin-top: 0;
}

.legal-text ul {
    margin-bottom: 1.5rem;
}

.legal-text li {
    margin-bottom: 0.5rem;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin-bottom: 0.5rem;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-col p {
    opacity: 0.8;
    font-size: 0.875rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

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

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    transition: color var(--transition-speed);
}

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

.footer-contact li {
    font-size: 0.875rem;
    opacity: 0.8;
}

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

.footer-bottom p {
    font-size: 0.875rem;
    opacity: 0.7;
    margin: 0;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-dark);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    display: none;
}

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

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.cookie-content p {
    margin: 0;
    font-size: 0.875rem;
}

.cookie-content a {
    color: var(--color-accent);
    text-decoration: underline;
}

/* Media Queries */
@media (min-width: 640px) {
    .newsletter-form {
        flex-direction: row;
    }

    .cookie-content {
        flex-direction: row;
        text-align: left;
    }

    .cookie-content p {
        flex: 1;
    }
}

@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }

    .logo-text {
        display: inline;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .nav-list {
        display: flex;
    }

    .hero {
        min-height: 600px;
    }

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

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

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

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

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

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

    .mission-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

@media (min-width: 1024px) {
    .hero {
        min-height: 700px;
    }

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

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (min-width: 1280px) {
    :root {
        --container-max: 1280px;
    }
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner,
    .hero-cta,
    .cta,
    .newsletter-section {
        display: none;
    }
}