/* =====================================================
   HOME PAGE - STYLES COMPLETS
   ===================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    padding: var(--space-xxl) var(--space-md);
}

.hero-home {
    background-image: url('https://www.maltadvice.com/wp-content/medias/4/malta-valletta.webp');
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 64, 175, 0.78) 50%, rgba(8, 145, 178, 0.68) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    width: 100%;
    padding: 0 var(--space-md);
    z-index: 1;
}

.hero-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: center;
}

.hero-catchphrase {
    font-size: clamp(32px, 4vw, 56px);
    color: var(--color-white);
    margin: 0 0 var(--space-xl) 0;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* Carrousel vertical pour le tagline */
.hero-tagline-carousel {
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto;
    max-width: 800px;
    line-height: 1.8;
    height: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out 1s forwards;
}

.tagline-rotating {
    position: relative;
    display: inline-block;
    height: 1.8em;
    min-width: 400px;
    text-align: center;
    overflow: hidden;
}

.tagline-rotating .tagline-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.tagline-rotating .tagline-item.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

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

/* Buttons */
.btn-primary {
    padding: 16px 32px;
    background: var(--color-white);
    color: var(--color-primary);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--font-base);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-primary);
}

.btn-secondary {
    padding: 16px 32px;
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--font-base);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

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

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

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xxl);
}

.section-title {
    font-size: clamp(28px, 3.5vw, 42px);
    color: var(--color-dark);
    margin: 0 0 var(--space-md) 0;
    font-weight: 800;
}

.section-description {
    font-size: var(--font-base);
    color: var(--color-text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Learning Section */
.learning-section {
    padding: var(--space-xxl) var(--space-md);
    background: var(--color-white);
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.categories-grid.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.category-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--color-light-grey);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--color-primary);
    transition: height 0.3s ease;
}

.category-card-link:hover .category-card {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

.category-card-link:hover .category-card::before {
    height: 100%;
}

.category-icon {
    width: 64px;
    height: 64px;
    background: var(--color-primary-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    transition: all 0.3s ease;
}

.category-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--color-primary);
    transition: all 0.3s ease;
}

.category-card-link:hover .category-icon {
    background: var(--color-primary);
    transform: scale(1.1);
}

.category-card-link:hover .category-icon svg {
    fill: var(--color-white);
}

.category-card h3 {
    font-size: var(--font-large);
    color: var(--color-dark);
    margin: 0 0 var(--space-sm) 0;
    font-weight: 700;
    line-height: 1.3;
}

.category-card p {
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0 0 var(--space-md) 0;
    font-size: var(--font-base);
}

.category-arrow {
    display: inline-block;
    color: var(--color-primary);
    font-size: 24px;
    font-weight: 700;
    transition: transform 0.3s ease;
}

.category-card-link:hover .category-arrow {
    transform: translateX(8px);
}

/* Why Malta Section - STRUCTURE CORRECTE */
.why-malta-section {
    padding: var(--space-xxl) var(--space-md);
    background: var(--color-white);
}

.why-malta-section .container {
    /* Conteneur simple sans style */
}

.why-malta-header {
    text-align: center;
    background: var(--color-primary-light);
    border-radius: 24px;
    padding: var(--space-xxl) var(--space-xl);
    padding-bottom: 200px; /* Long padding-bottom pour que les cartes remontent */
}

.why-malta-title {
    font-size: clamp(28px, 3.5vw, 42px);
    color: var(--color-dark);
    margin: 0 0 var(--space-md) 0;
    font-weight: 800;
    line-height: 1.3;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.why-malta-description {
    font-size: clamp(15px, 1.8vw, 17px);
    color: var(--color-text-light);
    max-width: 1100px;
    margin: 0 auto;
    line-height: 1.8;
}

.why-malta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: var(--max-width);
    margin: -150px auto 0; /* Margin-top NÉGATIF pour remonter sur le header bleu */
    padding: 0 var(--space-md);
}

.why-malta-card {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.why-malta-icon {
    width: 80px;
    height: 80px;
    background: var(--color-primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.why-malta-icon svg {
    width: 40px;
    height: 40px;
    fill: var(--color-white);
}

.why-malta-card h3 {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--color-dark);
    margin: 0 0 var(--space-sm) 0;
    font-weight: 700;
}

.why-malta-card p {
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0;
    font-size: clamp(14px, 1.5vw, 16px);
}

/* Discover Section */
.discover-section {
    padding: var(--space-xxl) var(--space-md);
    background: var(--color-white-grey);
}

/* Activities Section */
.activities-section {
    padding: var(--space-xxl) var(--space-md);
    background: var(--color-white);
}

.activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.activity-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.activity-card {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--color-light-grey);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.activity-card-link:hover .activity-card {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.activity-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.activity-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-white);
    border-radius: 50px;
    font-weight: 700;
    font-size: var(--font-small);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

.activity-content {
    padding: var(--space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.activity-content h3 {
    font-size: var(--font-large);
    color: var(--color-dark);
    margin: 0 0 var(--space-sm) 0;
    font-weight: 700;
}

.activity-content p {
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

/* Activities More Link */
.activities-more {
    text-align: center;
    margin-top: var(--space-xl);
}

.btn-more-activities {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 16px 32px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: var(--radius-lg);
    font-weight: 700;
    font-size: var(--font-base);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-more-activities:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    color: var(--color-white);
}

.btn-more-activities svg {
    transition: transform 0.3s ease;
}

.btn-more-activities:hover svg {
    transform: translateX(5px);
}

/* CTA Section */
.cta-section {
    padding: var(--space-xxl) var(--space-md);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.cta-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: clamp(28px, 3.5vw, 42px);
    color: var(--color-white);
    margin: 0 0 var(--space-md) 0;
    font-weight: 800;
}

.cta-content .cta-intro {
    font-size: clamp(16px, 1.8vw, 18px);
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto var(--space-lg);
    max-width: 800px;
    line-height: 1.7;
    font-weight: 400;
}

.cta-content p {
    font-size: var(--font-large);
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto var(--space-xl);
    max-width: 600px;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

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

.cta-section .btn-primary:hover {
    background: var(--color-white-grey);
    transform: translateY(-3px);
}

.cta-section .btn-secondary {
    border-color: var(--color-white);
    color: var(--color-white);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .categories-grid.two-columns {
        grid-template-columns: 1fr;
    }

    .why-malta-grid {
        grid-template-columns: 1fr;
        margin-top: -100px; /* Margin négatif réduit en tablette */
    }

    .why-malta-header {
        padding-bottom: 150px; /* Padding-bottom réduit en tablette */
    }

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

@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }

    .hero-catchphrase {
        font-size: 32px;
    }

    .hero-tagline-carousel {
        font-size: 16px;
        height: 2.5em;
    }

    .tagline-rotating {
        min-width: 300px;
        height: 1.8em;
    }

    .why-malta-header {
        padding: var(--space-lg) var(--space-md);
        padding-bottom: 120px; /* Padding-bottom réduit en mobile */
        border-radius: 16px;
    }

    .why-malta-grid {
        margin-top: -80px; /* Margin négatif réduit en mobile */
    }

    .why-malta-title {
        font-size: 28px;
    }

    .why-malta-description {
        font-size: 15px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .category-card {
        padding: var(--space-lg);
    }

    .activities-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .activity-image {
        height: 200px;
    }

    .cta-content h2 {
        font-size: 28px;
    }

    .cta-content .cta-intro {
        font-size: 16px;
    }

    .cta-content p {
        font-size: var(--font-base);
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .category-card {
        padding: var(--space-md);
    }

    .category-icon {
        width: 56px;
        height: 56px;
    }

    .category-icon svg {
        width: 28px;
        height: 28px;
    }

    .activity-content {
        padding: var(--space-md);
    }

    .why-malta-card {
        padding: var(--space-md);
    }
}
