/* --- hhisk AI Templates - style.css --- */

/* 1. Global Styles & Variables */
:root {
    --primary-color: #FF6B35;
    --secondary-color: #1B365D;
    --background-color: #F8F9FA;
    --text-color: #2C3E50;
    --card-bg: #FFFFFF;
    --border-color: #EAECEF;
    --heading-font: 'Inter', sans-serif;
    --body-font: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--card-bg);
}

h1, h2, h3, h4 {
    font-family: var(--heading-font);
    font-weight: 800;
    color: var(--secondary-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

h2 { font-size: 2.5rem; text-align: center; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; font-weight: 700; color: var(--secondary-color); }
p { margin-bottom: 15px; }

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #5a6a7b;
    max-width: 600px;
    margin: -15px auto 40px auto;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #e65c2e;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

/* 2. Header Section (Shared) */
.header {
    background-color: var(--card-bg);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu { display: flex; align-items: center; gap: 30px; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-color); font-weight: 600; transition: color 0.3s ease; }
.nav-links a:hover { color: var(--primary-color); }
.nav-actions { display: flex; align-items: center; gap: 20px; }
.user-icon { font-size: 1.8rem; color: var(--secondary-color); }

.language-selector { position: relative; }
.lang-btn { background: none; border: 1px solid var(--border-color); padding: 8px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 5px; }
.lang-dropdown { display: none; position: absolute; top: 120%; right: 0; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); min-width: 150px; list-style: none; overflow: hidden; }
.lang-dropdown.show { display: block; }
.lang-dropdown li a { display: block; padding: 10px 15px; text-decoration: none; color: var(--text-color); cursor: pointer; }
.lang-dropdown li a:hover { background-color: var(--background-color); color: var(--primary-color); }
.hamburger { display: none; font-size: 2rem; cursor: pointer; color: var(--secondary-color); }

/* 3. Hero Section */
.hero {
    text-align: center;
    padding: 120px 0;
    background: 
        linear-gradient(rgba(133, 133, 133, 0.7), rgba(129, 128, 128, 0.7)), /* Dark overlay to make text readable */
        url('images/hero-background.jpg') no-repeat center center/cover;
    color: white; /* Change text color to white to be visible on the dark background */
}

/* You also need to adjust the hero text color to be white */
.hero h1, .hero .subtitle {
    color: white;
}

/* 4. Popular Templates Section */
.template-category { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 25px; margin-bottom: 30px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.template-category:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(27, 54, 93, 0.08); }
.template-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 20px; flex-wrap: wrap; }
.template-header h3 { margin-bottom: 5px; }
/* --- 4a. NEW Template Equation Styles --- */

/* The main container for the "Style + Subject = Result" layout */
.template-equation {
    display: flex;
    justify-content: space-between; /* Spreads items out */
    align-items: center;
    gap: 15px; /* Adds space between items */
    margin-top: 15px;
}

/* The container for each image and its label */
.equation-item {
    position: relative; /* Needed to position the label */
    flex: 1; /* Allows items to grow and fill space */
    max-width: 30%; /* Prevents images from getting too big */
}

.equation-item img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block; /* Removes any bottom space under the image */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    aspect-ratio: 1 / 1; /* Keeps images square */
    object-fit: cover;
}

/* The "Style", "Subject", "Result" text labels */
.image-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.65);
    color: white;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    pointer-events: none; /* Allows clicks to go through the label */
}

/* The "+" and "=" symbols */
.equation-symbol {
    font-size: 2.5rem;
    color: #999;
    font-weight: 300;
    flex-shrink: 0; /* Prevents symbols from shrinking */
}

/* --- Responsive adjustments for the equation --- */
@media (max-width: 768px) {
    .template-equation {
        flex-direction: column; /* Stack items vertically on mobile */
        align-items: center;
        gap: 20px;
    }

    .equation-item {
        max-width: 80%; /* Allow items to be larger on mobile */
        width: 100%;
    }

    .equation-symbol {
        transform: rotate(90deg); /* Rotate symbols to point down */
    }
}

/* 5. Quick Start Guide Section */
.quick-start-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.start-step { text-align: center; padding: 30px; }
.start-step i { font-size: 3.5rem; color: var(--primary-color); margin-bottom: 20px; }
.start-step h3 { margin-bottom: 10px; }

/* 6. NEW: Long Article Section */
#long-article { background-color: var(--card-bg); }
.long-article-content {
    max-width: 800px;
    margin: 40px auto 0 auto;
    text-align: left;
    line-height: 1.8;
}
.long-article-content p {
    margin-bottom: 25px;
    font-size: 1.05rem;
}
.long-article-content h4 {
    margin-top: 40px;
    margin-bottom: 15px;
}

/* 7. FAQ Section */
.faq-container { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 15px; overflow: hidden; }
.faq-question { padding: 20px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 1.1rem; }
.faq-question i { transition: transform 0.3s ease; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s ease, padding 0.5s ease; padding: 0 20px; color: #4a5a6a; }
.faq-item.active .faq-answer { max-height: 300px; padding: 0 20px 20px 20px; }
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* 8. Articles Section */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.article-card { background: var(--card-bg); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.article-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(27, 54, 93, 0.1); }
.article-card img { width: 100%; height: 200px; object-fit: cover; }
.article-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.article-content h3 { font-size: 1.2rem; margin-bottom: 10px; }
.article-content p { font-size: 0.95rem; margin-bottom: 15px; flex-grow: 1; }
.article-meta { font-size: 0.85rem; color: #777; margin-bottom: 20px; }
.article-card .btn { align-self: flex-start; }

/* 9. Contact & Footer Section (Shared) */
.contact { text-align: center; }
.contact p { max-width: 500px; margin: -10px auto 20px auto; }
.contact-email { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); text-decoration: none; }
.footer { background: #ffe1d7; color: #000000; text-align: center; padding: 25px 0; margin-top: -1px; }

/* 10. Article Page Specific Styles */
.article-page { padding: 60px 0; }
.article-page .container { max-width: 800px; }
.article-header { text-align: center; margin-bottom: 40px; }
.article-header .article-meta { color: #5a6a7b; font-size: 0.9rem; }
.article-header h1 { font-size: 2.8rem; }
.article-full-image { width: 100%; height: auto; border-radius: 12px; margin-bottom: 40px; }
.article-body h3 { font-size: 1.8rem; margin-top: 40px; }
.article-body p { font-size: 1.1rem; line-height: 1.8; margin-bottom: 25px; }
.back-to-home { display: inline-block; margin-top: 40px; color: var(--primary-color); font-weight: 600; text-decoration: none; }
.back-to-home:hover { text-decoration: underline; }

/* 11. Responsive Design */
@media (max-width: 1024px) {
    h2 { font-size: 2.2rem; }
    .hero h1 { font-size: 3rem; }
    .quick-start-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    section { padding: 60px 0; }
    h2 { font-size: 1.8rem; }
    .hero { padding: 80px 0; }
    .hero h1 { font-size: 2.5rem; }
    .hero .subtitle { font-size: 1.1rem; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; width: 100%; background-color: var(--card-bg); padding: 20px 0; text-align: center; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
    .nav-links.active { display: flex; }
    .nav-actions .btn { display: none; }
    .hamburger { display: block; }
    .template-header { flex-direction: column; align-items: flex-start; }
    .template-preview-images { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .article-header h1 { font-size: 2.2rem; }
}
/* 12. Policy Page Specific Styles */
.policy-page {
    padding: 60px 0;
}
.policy-page .container {
    max-width: 800px;
}
.policy-page h1 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 40px;
}
.policy-page h3 {
    font-size: 1.6rem;
    margin-top: 40px;
}
.policy-page p, .policy-page li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}
.policy-page ul {
    list-style-position: inside;
    padding-left: 10px;
}

/* 13. Article & Policy Page Layout with Sidebar */
.article-layout {
    display: flex;
    gap: 40px; /* Space between content and sidebar */
    align-items: flex-start;
}

.main-content {
    flex: 3; /* Takes up 3/4 of the space */
    min-width: 0; /* Prevents flexbox overflow */
}

.sidebar {
    flex: 1; /* Takes up 1/4 of the space */
    position: sticky;
    top: 100px; /* Sticks below the header */
}

.sidebar-ad-placeholder {
    background: #e9ecef;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #6c757d;
}

.sidebar-ad-placeholder h4 {
    margin-bottom: 10px;
    color: #495057;
}

/* Responsive adjustments for the layout */
@media (max-width: 1024px) {
    .article-layout {
        flex-direction: column;
    }
    .sidebar {
        position: static; /* Unstick the sidebar on smaller screens */
        width: 100%;
        margin-top: 40px;
    }
}