/*
Theme Name: Hello Elementor Child
Theme URI:  https://example.com/hello-elementor-child
Description: Child theme of Hello Elementor. Includes a reusable right sidebar page template and modern default styles.
Author: Your Name
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
*/

/* CSS Variables */
:root {
    --max-width: 1400px;
    --gap: 24px;
    --bg: #ffffff;
    --muted: #6b7280;
    --accent: #0ea5a4;
    --card: #f8fafc;
    --radius: 12px;
    --shadow: 0 6px 18px rgba(15,23,42,0.06);
    --primary-color: #007cba;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: var(--bg);
    color: #111827;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

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

/* Legacy Layout Support */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--gap);
    align-items: start;
}

main.site-main {
    background: linear-gradient(180deg, rgba(255,255,255,1), rgba(250,250,250,1));
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

aside.site-sidebar {
    position: relative;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    height: fit-content;
}

/* Hero Styles */
.hero {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

/* Modern Page Layout */
.modern-page-layout {
    padding: 40px 0;
    background: var(--light-gray);
    min-height: 100vh;
}

.page-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Content */
.main-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 500px;
}

.main-content h1.entry-title {
    font-size: 28px !important;
    font-weight: 700 !important;
    color: var(--text-color) !important;
    margin: 0 0 30px 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 3px solid var(--primary-color) !important;
    font-family: inherit !important;
    text-transform: none !important;
    line-height: 1.2 !important;
}

/* Modern Sidebar */
.modern-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Sidebar Widget Base */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Widget Title */
.sidebar-widget h6.widget-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 15px 0 !important;
    border-bottom: 3px solid var(--primary-color) !important;
    color: var(--text-color) !important;
    position: relative;
    font-family: inherit !important;
    line-height: 1.3 !important;
    text-transform: none !important;
}

.sidebar-widget h6.widget-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, var(--primary-color), #00a0d2);
    border-radius: 2px;
}

/* Latest News Widget */
.latest-news .news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.latest-news .news-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.latest-news .news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.latest-news .news-item:hover {
    background: rgba(0, 124, 186, 0.02);
    padding: 10px;
    border-radius: 8px;
    margin: -10px;
}

/* News Thumbnail */
.latest-news .news-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.latest-news .news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-news .news-thumbnail:hover .news-image {
    transform: scale(1.1);
}

.latest-news .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.latest-news .no-image i {
    font-size: 24px;
}

/* News Content */
.latest-news .news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.latest-news .news-date {
    font-size: 11px !important;
    color: #7f8c8d !important;
    font-weight: 500 !important;
    margin: 0 !important;
    font-family: inherit !important;
}

/* Custom Title untuk News Item */
.my-custom-title {
    text-transform: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: inherit !important;
    line-height: 1.3 !important;
}

.my-custom-title a {
    color: var(--text-color) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    display: block;
    transition: color 0.3s ease;
}

.my-custom-title a:hover {
    color: var(--primary-color) !important;
}

/* Categories Widget */
.categories-widget .categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.categories-widget .category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--light-gray);
    border-radius: 8px;
    text-decoration: none !important;
    color: var(--text-color) !important;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: inherit !important;
}

.categories-widget .category-item:hover {
    background: linear-gradient(135deg, #1829FFCC, #40A788) !important;
    color: white !important;
    transform: translateX(5px);
    border-color: #c9c9c9 !important;
    text-decoration: none !important;
}

.categories-widget .category-name {
    font-weight: 500 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    text-transform: none !important;
}

.categories-widget .post-count {
    background: rgba(0,0,0,0.1);
    color: #7f8c8d;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    min-width: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.categories-widget .category-item:hover .post-count {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

/* Promo Widget */
.promo-widget {
    padding: 0 !important;
    overflow: hidden;
    background: none;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
    border-radius: 12px;
}

.promo-widget .promo-image-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
}

.promo-widget .promo-image-container:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}

.promo-widget .promo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    filter: brightness(0.9);
    background: white;
    opacity: 0;
    animation: fadeInImage 0.8s ease forwards;
}

.promo-widget .promo-image-container:hover .promo-image {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.promo-widget .promo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 124, 186, 0.8) 0%,
        rgba(0, 160, 210, 0.6) 50%,
        rgba(14, 165, 164, 0.8) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.promo-widget .promo-image-container:hover .promo-overlay {
    opacity: 1;
}

.promo-widget .promo-content {
    text-align: center;
    color: white;
    /*padding: 20px;*/
    transform: translateY(20px);
    transition: transform 0.4s ease;
    font-family: inherit;
}

.promo-widget .promo-image-container:hover .promo-content {
    transform: translateY(0);
}

/* Promo Title */
.promo-widget h6.promo-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 8px 0 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    line-height: 1.2 !important;
    font-family: inherit !important;
    color: white !important;
    text-transform: none !important;
    border: none !important;
    padding: 0 !important;
}

.promo-widget .promo-subtitle {
    font-size: 14px !important;
    margin: 0 !important;
    opacity: 0.9;
    font-weight: 500 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-family: inherit !important;
    color: white !important;
}

/* Override semua h6 di sidebar agar tidak uppercase */
.modern-sidebar h6,
.modern-sidebar h6 a {
    text-transform: none !important;
}

/* Gambar promo di sidebar biar full */
.modern-sidebar img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    margin: 0 auto;
    border-radius: 8px; /* opsional, biar lebih rapi */
}


/* Animation */
@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }
    
    aside.site-sidebar {
        order: 2;
    }
    
    .page-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /*.modern-sidebar {*/
    /*    order: -1;*/
    /*}*/
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-content-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    /*.modern-sidebar {*/
    /*    order: -1;*/
    /*}*/
    
    .main-content {
        padding: 25px;
    }
    
    .main-content h1.entry-title {
        font-size: 24px !important;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .sidebar-widget h6.widget-title {
        font-size: 16px !important;
    }
    
    .latest-news .news-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .my-custom-title {
        font-size: 13px !important;
    }
    
    .latest-news .news-date {
        font-size: 10px !important;
    }
    
    .categories-widget .category-name {
        font-size: 13px !important;
    }
    
    .promo-widget .promo-image-container {
        height: 180px;
    }
    
    .promo-widget h6.promo-title {
        font-size: 15px !important;
    }
    
    .promo-widget .promo-subtitle {
        font-size: 13px !important;
    }
}

@media (max-width: 480px) {
    .modern-page-layout {
        padding: 20px 0;
    }
    
    .page-content-wrapper {
        padding: 0 10px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .main-content h1.entry-title {
        font-size: 22px !important;
    }
    
    .sidebar-widget {
        padding: 15px;
    }
    
    .sidebar-widget h6.widget-title {
        font-size: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .latest-news .news-item {
        gap: 12px;
    }
    
    .latest-news .news-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .my-custom-title {
        font-size: 12px !important;
    }
    
    .latest-news .news-date {
        font-size: 9px !important;
    }
    
    .categories-widget .category-item {
        padding: 10px 12px;
    }
    
    .categories-widget .category-name {
        font-size: 12px !important;
    }
    
    .categories-widget .post-count {
        font-size: 10px !important;
        padding: 3px 8px;
    }
    
    .promo-widget .promo-image-container {
        height: 150px;
    }
    
    .promo-widget h6.promo-title {
        font-size: 14px !important;
    }
    
    .promo-widget .promo-subtitle {
        font-size: 12px !important;
    }
}


/*hero*/
.hero-modern {
        width: 100%;
        height: 350px;
        background: #002366;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
        overflow: hidden;

        /* Request kamu */
        margin-top: -100px;
        z-index: 1;
    }

    .hero-modern::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(0,0,0,0.1), rgba(255,255,255,0.15));
        opacity: 0.4;
    }

    .hero-floating-circle {
        position: absolute;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background: rgba(255,255,255,0.08);
        top: -40px;
        left: -40px;
        animation: floatCircle 6s ease-in-out infinite alternate;
    }

    .hero-floating-circle2 {
        position: absolute;
        width: 250px;
        height: 250px;
        border-radius: 50%;
        background: rgba(255,255,255,0.05);
        bottom: -60px;
        right: -60px;
        animation: floatCircle 7s ease-in-out infinite alternate-reverse;
    }

    @keyframes floatCircle {
        0% { transform: translateY(0) scale(1); }
        100% { transform: translateY(-20px) scale(1.05); }
    }

    .hero-content {
        position: relative;
        z-index: 10;
        color: white;
        max-width: 800px;
        padding: 20px;
        animation: fadeSlide 1.4s ease-out forwards;
        opacity: 0;
        transform: translateY(20px);
        color: white;
    }

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

    .hero-title {
        font-size: 20px;
        font-weight: 700;
        letter-spacing: 1px;
        margin-top: 100px;
        color: #ffffff !important; /* memastikan warna putih */
    }

    .hero-subtitle {
        font-size: 15px;
        opacity: 0.9;
        margin-top: 5px;
        font-weight: 300;
    }

    @media(max-width: 768px) {
        .hero-title { font-size: 26px; }
        .hero-subtitle { font-size: 15px; }
    }

/* Mobile: tumpuk vertikal — konten di atas, sidebar di bawah */
@media (max-width: 992px) {
    .page-content-wrapper {
        grid-template-columns: 1fr;
    }
}
