/* ============================================
   MOTOR EXPERT - Homepage Styles (MEX Design)
   Hero, Services Cards, Benefits, Contact Form
   ============================================ */

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 80px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wave pattern - static */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23ffffff"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" fill="%23ffffff"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z" fill="%23ffffff"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.hero::after {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    max-width: 340px;
    width: 100%;
    height: auto;
    margin: 0 auto 25px;
    animation: fadeInUp 0.8s ease;
}

.hero-tagline {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title {
    font-size: 20px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 25px;
    animation: fadeInUp 0.8s ease 0.4s both;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

/* Hero Map - same style as courses.css */
.hero-map-container {
    width: 100%;
    max-width: 420px;
    margin: 25px auto 30px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-map-container .czech-map {
    width: 100%;
    height: auto;
}

/* Czech Map Outline */
.hero-map-container .map-outline {
    fill: rgba(255, 255, 255, 0.1);
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 2;
    stroke-linejoin: round;
    filter: 
        drop-shadow(0 0 8px rgba(255, 255, 255, 0.4)) 
        drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3))
        drop-shadow(0 -3px 6px rgba(0, 0, 0, 0.2));
}

/* Active point - Přerov */
.hero-map-container .point-glow {
    fill: rgba(255, 255, 255, 0.2);
}

.hero-map-container .point-center {
    fill: #fff;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 1));
}

.hero-map-container .pulse-ring {
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center center;
    -webkit-animation: pulse-expand 2.5s ease-out infinite;
    animation: pulse-expand 2.5s ease-out infinite;
}

.hero-map-container .pulse-ring.delay {
    -webkit-animation-delay: 1.25s;
    animation-delay: 1.25s;
}

@-webkit-keyframes pulse-expand {
    0% {
        opacity: 0.8;
        stroke-width: 2;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    100% {
        opacity: 0;
        stroke-width: 1;
        -webkit-transform: scale(1.4);
        transform: scale(1.4);
    }
}

@keyframes pulse-expand {
    0% {
        opacity: 0.8;
        stroke-width: 2;
        -webkit-transform: scale(1);
        transform: scale(1);
    }
    100% {
        opacity: 0;
        stroke-width: 1;
        -webkit-transform: scale(1.4);
        transform: scale(1.4);
    }
}

.hero-map-container .point-label-active {
    fill: #fff;
    font-size: 16px;
    font-weight: 700;
    text-anchor: middle;
    letter-spacing: 0.5px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
}

@-webkit-keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(20px);
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

/* =============================================
   SERVICES SECTION - CARDS
   ============================================= */
.services-section {
    padding: 80px 20px;
    background: var(--gray-50);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    padding: 35px 30px;
    text-align: center;
    text-decoration: none;
    color: var(--gray-800);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: block;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(45, 95, 63, 0.2);
    border-color: var(--primary);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(45, 138, 78, 0.08), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::after {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon.has-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.service-emoji {
    font-size: 48px;
    line-height: 1;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
}

.service-card p {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 15px;
}

.service-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 20px;
    position: absolute;
    top: 15px;
    right: 15px;
}

.service-badge.accent {
    background: linear-gradient(135deg, #e07b00 0%, #f59e0b 100%);
}

/* =============================================
   BENEFITS SECTION
   ============================================= */
.benefits-section {
    padding: 80px 20px;
    background: var(--white);
}

.benefits-logo {
    max-width: 200px;
    height: auto;
    margin: 0 auto 25px;
    display: block;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.benefit-card {
    text-align: center;
    padding: 30px 25px;
    border-radius: 12px;
    background: var(--gray-50);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: default;
}

.benefit-card:hover {
    background: var(--white);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.benefit-card:hover::before {
    border-color: var(--primary-light);
}

.benefit-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.4s ease;
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.15) rotate(-5deg);
}

.benefit-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
}

.benefit-card p {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
}

/* Subtle pulse animation for benefit cards */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 15px rgba(45, 138, 78, 0.05); }
    50% { box-shadow: 0 8px 25px rgba(45, 138, 78, 0.12); }
}

.benefits-grid .benefit-card {
    animation: pulseGlow 3s ease-in-out infinite;
}

.benefits-grid .benefit-card:nth-child(2) { animation-delay: 0.3s; }
.benefits-grid .benefit-card:nth-child(3) { animation-delay: 0.6s; }
.benefits-grid .benefit-card:nth-child(4) { animation-delay: 0.9s; }
.benefits-grid .benefit-card:nth-child(5) { animation-delay: 1.2s; }
.benefits-grid .benefit-card:nth-child(6) { animation-delay: 1.5s; }

.benefits-grid .benefit-card:hover {
    animation: none !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

/* =============================================
   ARTICLES SECTION (AKTUALITY)
   ============================================= */
.articles-section {
    padding: 80px 20px;
    background: var(--gray-50);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.article-card-image {
    height: 180px;
    background: var(--gray-200);
    background-size: cover;
    background-position: center;
}

/* Placeholder with logo for articles without image */
.article-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d8a4e 0%, #3a9d5c 50%, #4ab068 100%) !important;
}

.article-card-placeholder .placeholder-logo {
    max-width: 120px;
    height: auto;
    opacity: 0.25;
    filter: brightness(10);
}

.article-card-body {
    padding: 20px;
}

.article-card-date {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.article-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-card-excerpt {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 15px;
}

.article-card-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.article-card-link:hover {
    text-decoration: underline;
}

.articles-more {
    text-align: center;
    margin-top: 40px;
}

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.contact-section .section-title,
.contact-section .section-subtitle {
    color: var(--white);
}

.contact-section .section-subtitle {
    opacity: 0.9;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-form {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    transition: all 0.2s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 138, 78, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-block {
    width: 100%;
}

.form-message {
    display: none;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    text-align: center;
}

.form-message.success {
    background: #e8f5ec;
    color: #2d5f3f;
    border: 2px solid #4a9d5f;
}

.form-message.error {
    background: #fee;
    color: #c33;
    border: 2px solid #c33;
}

/* Contact Info Cards */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-info-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: var(--gray-800);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.contact-info-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.contact-info-card h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--gray-500);
}

.contact-info-card a {
    color: var(--primary);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    display: block;
    margin: 3px 0;
}

.contact-info-card a:hover {
    text-decoration: underline;
}

.contact-info-card p {
    color: var(--gray-700);
    font-size: 14px;
    margin: 3px 0;
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray-600);
}

/* =============================================
   FOOTER
   ============================================= */
/* =============================================
   ANIMATIONS
   ============================================= */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animations for grids */
.services-grid .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.services-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.services-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.services-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.services-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }
.services-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.6s; }

.benefits-grid .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.benefits-grid .animate-on-scroll:nth-child(2) { transition-delay: 0.15s; }
.benefits-grid .animate-on-scroll:nth-child(3) { transition-delay: 0.2s; }
.benefits-grid .animate-on-scroll:nth-child(4) { transition-delay: 0.25s; }
.benefits-grid .animate-on-scroll:nth-child(5) { transition-delay: 0.3s; }
.benefits-grid .animate-on-scroll:nth-child(6) { transition-delay: 0.35s; }

/* =============================================
   SKELETON LOADING
   ============================================= */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact-info-card {
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 20px 80px;
        min-height: auto;
    }
    
    .hero-logo {
        max-width: 260px;
        margin-bottom: 20px;
    }
    
    .hero-tagline {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .hero-map-container {
        max-width: 280px;
        margin-bottom: 20px;
    }
    
    .hero-map-container .czech-map {
        transform: rotateX(15deg);
    }
    
    .hero-map-container .point-label {
        font-size: 12px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .services-section,
    .benefits-section,
    .articles-section,
    .contact-section {
        padding: 60px 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .contact-form {
        padding: 25px 20px;
    }
}
/* =============================================
   ARTICLE MODAL
   ============================================= */
/* Modal overridy — homepage má světlý header (základ v components.css) */
.modal-header {
    background: white;
    color: var(--gray-800);
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-close {
    top: 12px;
    right: 12px;
    background: #f5f5f5;
    color: #666;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-close svg {
    fill: currentColor;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    background: white;
    border-top: 1px solid #eee;
}

/* Article card badge */
.article-card {
    position: relative;
}

.article-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 1;
}

/* Article card hover effect */
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.article-card:hover .article-card-title {
    color: var(--primary);
}

@media (max-width: 600px) {
    .modal {
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}