/* ========================================
   ALFIN COMPUTER - Responsive CSS
   Facebook Mobile Style Design
   ======================================== */

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

:root {
    --primary-color: #1877F2;
    --secondary-color: #E7F3FF;
    --text-dark: #050505;
    --text-light: #65676B;
    --border-color: #CED0D4;
    --bg-light: #F0F2F5;
    --white: #FFFFFF;
    --success-color: #31A24C;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
}

/* ========================================
   HEADER / NAVBAR
   ======================================== */

.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--secondary-color);
}

.logo-text h1 {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0;
}

.logo-text .tagline {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
    display: none;
}

/* ========================================
   NAVIGATION MENU
   ======================================== */

.nav-menu {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
    overflow-x: auto;
}

.nav-link {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    border-bottom: 3px solid transparent;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background-color: var(--bg-light);
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* ========================================
   MAIN CONTAINER
   ======================================== */

.container {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-light);
}

/* ========================================
   HERO SECTION
   ======================================== */

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

.hero-banner {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--white);
    padding: 30px 16px 16px;
    text-align: center;
}

.hero-overlay h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.hero-overlay p {
    font-size: 14px;
}

.hero-cta {
    display: flex;
    gap: 8px;
    padding: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background-color: #0A66C2;
    box-shadow: 0 2px 8px rgba(24, 119, 242, 0.3);
}

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

.btn-whatsapp:hover {
    background-color: #25A040;
    box-shadow: 0 2px 8px rgba(49, 162, 76, 0.3);
}

/* ========================================
   HIGHLIGHTS / FEATURES
   ======================================== */

.highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px;
}

.highlight-card {
    background-color: var(--white);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.highlight-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.highlight-card .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.highlight-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.highlight-card p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

/* ========================================
   FEED / POSTS (Facebook-like)
   ======================================== */

.feed {
    padding: 16px;
}

.section-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-dark);
    padding: 0;
}

.post-card {
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.post-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.post-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--secondary-color);
    margin-right: 12px;
}

.post-info {
    flex: 1;
}

.post-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
}

.post-time {
    font-size: 12px;
    color: var(--text-light);
}

.post-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-content {
    padding: 12px 16px;
}

.post-content h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-dark);
}

.post-content p {
    font-size: 14px;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.5;
}

.post-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.post-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    background-color: var(--bg-light);
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn:hover {
    background-color: #E4E6EB;
}

.action-btn:active {
    transform: scale(0.98);
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.about {
    padding: 16px;
}

.about-content {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.about-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: var(--bg-light);
}

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

.about-text {
    padding: 16px;
}

.about-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.about-text p {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 16px;
}

.about-text h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 16px 0 12px 0;
    color: var(--text-dark);
}

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

.about-list li {
    font-size: 14px;
    color: var(--text-dark);
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* ========================================
   CONTACT SECTION
   ======================================== */

.contact {
    padding: 16px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.contact-card {
    background-color: var(--white);
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.contact-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.contact-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.contact-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.contact-card a {
    font-size: 13px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}

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

.map-section {
    background-color: var(--white);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.map-section h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.map-container iframe {
    display: block;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    margin-top: 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    padding: 24px 16px;
    max-width: 600px;
    margin: 0 auto;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.footer-section p {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.social-links a {
    font-size: 12px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.social-links a:hover {
    text-decoration: underline;
}

.footer-bottom {
    background-color: var(--bg-light);
    text-align: center;
    padding: 16px;
    font-size: 12px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

/* ========================================
   SCROLL TO TOP BUTTON
   ======================================== */

.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scroll-to-top:hover {
    background-color: #0A66C2;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu.hidden {
        display: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

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

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

    .hero-banner {
        height: 250px;
    }

    .post-image {
        height: 240px;
    }

    .about-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 10px 12px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .logo-img {
        width: 45px;
        height: 45px;
    }

    .nav-link {
        font-size: 12px;
        padding: 10px 8px;
    }

    .hero-overlay h2 {
        font-size: 18px;
    }

    .section-title {
        font-size: 18px;
    }

    .post-content h4 {
        font-size: 15px;
    }

    .about-text h3 {
        font-size: 16px;
    }

    .contact-grid {
        gap: 8px;
    }

    .contact-card {
        padding: 12px;
    }

    .contact-card h3 {
        font-size: 13px;
    }

    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 16px;
        right: 16px;
        font-size: 18px;
    }
}

/* ========================================
   ANIMATION & TRANSITIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.4s ease;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
