/* FirstMedic Design System & Styling */

:root {
    /* Color Palette */
    --primary-color: #D92323;     /* Main Red */
    --primary-dark: #b51c1c;      /* Darker Red for hover */
    --secondary-color: #1a1a2e;   /* Dark slate for text/headers */
    --text-color: #4a4a5e;        /* Body text */
    --light-bg: #f0f3f7;          /* Soft cool gray background for distinct contrast */
    --white: #ffffff;
    --wa-green: #25D366;          /* WhatsApp Green */
    --wa-dark: #128C7E;
    
    /* Typography */
    --font-family: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Shadows */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
}

html, body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 600;
    line-height: 1.2;
}

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

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

/* Layout Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

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

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

.mt-4 {
    margin-top: 2rem;
}

.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.line.align-left {
    margin: 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(217, 35, 35, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217, 35, 35, 0.4);
    color: var(--white);
}

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

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

.btn-wa {
    background-color: var(--wa-green);
    color: var(--white);
    width: 100%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-wa:hover {
    background-color: var(--wa-dark);
    transform: translateY(-2px);
    color: var(--white);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
}

.header.scrolled .nav-link {
    color: var(--secondary-color);
}

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

.logo-img {
    height: 65px;
    transition: var(--transition);
}

.header.scrolled .logo-img {
    height: 50px;
}

.nav-list {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
}

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

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

.header-cta {
    padding: 10px 24px;
    border-radius: 30px;
    margin-left: 10px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    z-index: 1001;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.mobile-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

.header.scrolled .mobile-toggle span {
    background-color: var(--secondary-color);
}

.header.scrolled .mobile-toggle {
    filter: none;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('../img/foto/IMG-20260528-WA0019.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.9) 0%, rgba(217, 35, 35, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffcccc;
}

.hero-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Video Section */
.video-wrapper {
    max-width: 900px;
    margin: 0 auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.video-placeholder {
    width: 100%;
    height: 500px;
    background-image: url('../img/foto/IMG-20260528-WA0016.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.video-placeholder:hover::before {
    background-color: rgba(0, 0, 0, 0.2);
}

.play-btn {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
    box-shadow: 0 0 0 10px rgba(217, 35, 35, 0.3);
    animation: pulse 2s infinite;
    margin-bottom: 15px;
}

.play-btn::after {
    content: '';
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 20px solid var(--white);
    margin-left: 5px;
}

.video-placeholder p {
    position: relative;
    z-index: 1;
    color: var(--white);
    font-weight: 600;
    font-size: 1.2rem;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 35, 35, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(217, 35, 35, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 35, 35, 0); }
}

/* Our Story */
.story-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.story-image img {
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.story-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.story-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Training Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

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

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Why Us Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-item h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Blog Cards */
.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

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

.blog-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 25px;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.blog-content p {
    color: var(--text-color);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-logo {
    height: 80px;
    margin-bottom: 25px;
}

.cta-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-info p {
    opacity: 0.8;
}

.footer-info, .footer-contact {
    min-width: 0;
}

.footer-contact h3 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.5rem;
}

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

.contact-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.contact-list li strong {
    width: 100px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.contact-list a {
    color: var(--white);
    opacity: 0.8;
    word-break: break-word;
    overflow-wrap: break-word;
}

.contact-list a:hover {
    color: var(--primary-color);
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.6;
    font-size: 0.9rem;
}

/* Floating WhatsApp Button */
.float-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--wa-green);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.float-wa:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .story-container {
        grid-template-columns: 1fr;
    }
    
    .story-image {
        order: 2;
    }
    
    .story-text {
        order: 1;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-list {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }
    
    .nav-list.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    .nav-link {
        color: var(--secondary-color);
        display: block;
        padding: 10px 0;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero {
        background-attachment: scroll;
    }
    
    .cards-grid, .features-grid, .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .video-placeholder {
        height: 300px;
    }
    
    .article-header {
        padding: 120px 0 40px;
    }
    
    .article-header h1 {
        font-size: 2.2rem;
    }
    
    .article-cover {
        margin-top: -40px;
        max-height: 300px;
    }
    
    .footer-container {
        gap: 30px;
    }
    
    .cta-text {
        font-size: 1.25rem;
    }
    
    .contact-list li strong {
        width: 80px;
    }
    
    .footer-logo {
        height: 60px;
    }
    
    .header-cta {
        margin-left: 0;
        margin-top: 10px;
        align-self: flex-start;
    }
    
    .float-wa {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .float-wa svg {
        width: 25px;
        height: 25px;
    }
}

/* Blog Detail Page Styles */
.article-header {
    padding: 160px 0 60px;
    background-color: var(--light-bg);
    text-align: center;
}

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

.back-link {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.category {
    display: inline-block;
    background-color: rgba(217, 35, 35, 0.1);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.meta {
    color: var(--text-color);
    font-size: 0.95rem;
}

.meta span {
    display: inline-block;
    margin: 0 10px;
}

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

.article-cover {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 16px;
    margin-top: -80px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 10;
}

.article-content {
    font-size: 1.15rem;
    color: var(--text-color);
    line-height: 1.8;
}

.article-content h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    color: var(--secondary-color);
}

.article-content p {
    margin-bottom: 20px;
}

.article-content .lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--secondary-color);
}

.article-content ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    font-size: 1.4rem;
    font-weight: 600;
    font-style: italic;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
    padding: 20px 30px;
    margin: 40px 0;
    background-color: rgba(217, 35, 35, 0.05);
    border-radius: 0 12px 12px 0;
}

.article-content figure {
    margin: 40px 0;
}

.article-content figure img {
    border-radius: 12px;
    width: 100%;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.95rem;
    color: #888;
    margin-top: 10px;
    font-style: italic;
}

.article-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.share-section h3 {
    margin-bottom: 20px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
