
/* =========================================
   1. CSS Reset & Variables
   ========================================= */
:root {
    /* Color Palette */
    --primary-color: #ff5402;
    --primary-gradient: linear-gradient(135deg, #ff5402 0%, #ff7e42 100%);
    --primary-shadow: rgba(255, 84, 2, 0.4);
    
    --secondary-color: #0f1c2e;
    --secondary-gradient: linear-gradient(135deg, #0f1c2e 0%, #1e3554 100%);
    
    --text-main: #2c3e50;
    --text-light: #596b7e;
    --text-white: #ffffff;
    
    --bg-body: #f4f7f9;
    --bg-card: #ffffff;
    
    --accent-success: #27ae60;
    --accent-danger: #e74c3c;
    --accent-info: #3498db;

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height: 1.6;
    --transition-speed: 0.3s;
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 2rem;
    
    /* Spacing */
    --container-width: 1200px;
    --gap-md: 2rem;
}

/* Reset & Normalization */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: var(--line-height);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: #e04400;
}

ul, ol {
    list-style: none;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* =========================================
   2. Layout & Containers
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Grid Layout for Main Content */
#content.site-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px; /* Responsive Grid */
    gap: var(--gap-md);
    padding-top: 3rem;
    padding-bottom: 3rem;
    animation: fadeIn 0.8s ease-out;
}

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

/* =========================================
   3. Typography & Headings
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.entry-title {
    font-size: clamp(1.8rem, 4vw, 3rem); /* Fluid typography */
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.entry-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin-top: 2.5rem;
    text-align: center;
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-light);
    font-size: 1.05rem;
}

/* =========================================
   4. Interactive Elements (Buttons)
   ========================================= */
.btn-box {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-white) !important;
    background: var(--primary-gradient) !important; /* Override inline styles nicely */
    border: none;
    border-radius: 50px;
    box-shadow: 0 10px 20px var(--primary-shadow);
    cursor: pointer;
    transition: all var(--transition-speed) cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn:hover, .btn:focus {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 25px rgba(255, 84, 2, 0.6);
    color: white;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 10px rgba(255, 84, 2, 0.4);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: 0.5s;
}

.btn:hover::after {
    left: 100%;
}

/* =========================================
   5. Content Styling (Article)
   ========================================= */
.site-main {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

.page-separator {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.1), transparent);
    margin: 2rem 0;
}

/* Images */
.entry-content img {
    border-radius: var(--radius-md);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin: 1.5rem auto;
    transition: transform var(--transition-speed) ease;
}

.entry-content a img:hover {
    transform: scale(1.01);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

/* Blockquotes / Alerts */
blockquote {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-sm);
    position: relative;
    background: #f9f9f9;
    border-left: 5px solid #ccc;
}

blockquote.info {
    background-color: rgba(52, 152, 219, 0.1);
    border-left-color: var(--accent-info);
    color: #2c3e50;
}

blockquote.danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-left-color: var(--accent-danger);
    color: #c0392b;
    font-weight: 600;
}

blockquote.check {
    background-color: rgba(39, 174, 96, 0.1);
    border-left-color: var(--accent-success);
    color: #27ae60;
}

blockquote p {
    margin-bottom: 0;
}

/* Lists */
.entry-content ul, .entry-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.entry-content ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    color: var(--text-main);
}

.entry-content ol li {
    list-style-type: decimal;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    font-weight: 500;
}

/* =========================================
   6. Sidebar Styling
   ========================================= */
.widget-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed);
}

.widget:hover {
    transform: translateY(-2px);
}

.widget-header {
    font-weight: 800;
    text-transform: uppercase;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    letter-spacing: 1px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

/* =========================================
   7. Form Elements (Modern & Clean)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-main);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
    background-color: #fdfdfd;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 84, 2, 0.1);
}

/* Checkboxes & Radios */
input[type="checkbox"], input[type="radio"] {
    accent-color: var(--primary-color);
    width: 1.2rem;
    height: 1.2rem;
    cursor: pointer;
}

/* =========================================
   8. Footer Styling
   ========================================= */
.site-footer {
    background: var(--secondary-gradient);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

/* Scroll Top Button */
.scrolltop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

.scrolltop::before {
    content: '↑';
    color: white;
    font-size: 1.5rem;
    line-height: 3rem;
    display: block;
    text-align: center;
}

.scrolltop.is-visible, .scrolltop:hover { /* Assuming JS adds class */
    opacity: 1;
    visibility: visible;
}

/* =========================================
   9. Responsive Design (Mobile & Tablet)
   ========================================= */
@media (max-width: 992px) {
    #content.site-content {
        grid-template-columns: 1fr; /* Stack sidebar below content */
    }
    
    .site-main {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px; /* Slightly smaller font base */
    }

    .site-main {
        padding: 1.5rem;
    }

    .entry-title {
        font-size: 1.8rem;
    }
    
    .btn {
        width: 100%; /* Full width buttons on mobile */
        padding: 1rem;
    }

    .btn-box {
        margin: 1.5rem 0;
    }

    blockquote {
        margin: 1.5rem 0;
        padding: 1rem;
    }

    /* Fix images overlapping */
    .entry-content img {
        height: auto !important; /* Override fixed heights if any */
    }
}
