/* ==========================================================================
   Universal Stylesheet for rollyourownvpn.com
   ========================================================================== */

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Variables (Your Site's Design System) --- */
:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    
    /* Color Palette */
    --color-primary: #4F46E5; /* Indigo */
    --color-primary-dark: #4338CA;
    --color-secondary: #111827; /* Dark Blue/Gray for Headers */
    --color-accent: #1e40af; /* Darker blue for notes */
    
    --color-text: #1f2937; /* Dark Gray */
    --color-text-light: #4b5563; /* Medium Gray */
    --color-text-inverted: #e2e8f0; /* Light text for dark backgrounds */

    --color-background: #f9fafb; /* Very light gray */
    --color-background-alt: #ffffff; /* White for cards/articles */
    --color-background-dark: #1a202c; /* For dark components */
    
    --color-border: #e5e7eb;
    
    /* Note/Warning Colors */
    --color-note-bg: #ebf4ff;
    --color-note-border: #60a5fa;
    --color-note-text: #1e40af;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #facc15;
    --color-warning-text: #713f12;

    /* Spacing & Sizing */
    --container-width: 1100px;
    --border-radius: 0.75rem;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- Base & Reset Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-primary);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.2;
    font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
p { margin-bottom: 1rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* --- Navigation Bar --- */
.main-nav {
    background-color: var(--color-background-alt);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}
.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.main-nav .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}
.main-nav .logo:hover {
    text-decoration: none;
}
.main-nav .nav-links a {
    margin-left: 1.5rem;
    font-weight: 500;
    color: var(--color-text-light);
}
.main-nav .nav-links a:hover {
    color: var(--color-primary);
    text-decoration: none;
}
.main-nav .nav-links a.active {
    color: var(--color-primary);
    font-weight: 600;
}

/* --- Headers --- */
.page-header {
    color: var(--color-text-inverted);
    padding: 4rem 0;
    text-align: center;
}
.page-header.bg-dark { background-color: var(--color-secondary); }
.page-header.bg-red { background-color: #7f1d1d; }
.page-header.bg-blue-gradient { background: linear-gradient(90deg, #4F46E5 0%, #1e40af 100%); }

.page-header .subtitle {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 600;
    color: #cbd5e1; /* A light gray for subtitles */
}
.page-header h1 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* --- Buttons --- */
.cta-button {
    display: inline-block;
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.cta-button:hover {
    background-color: var(--color-primary-dark);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

/* --- Guide Cards --- */
.guides-grid {
    display: grid;
    gap: 2rem;
}
.guide-card {
    background-color: var(--color-background-alt);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}
.guide-card h3 {
    margin-top: 0;
    color: var(--color-primary);
}
.guide-card p {
    color: var(--color-text-light);
    flex-grow: 1; /* Pushes button to bottom */
}
.guide-card .tags {
    margin-bottom: 1.5rem;
}
.guide-card .tags span {
    background-color: #e0e7ff;
    color: #3730a3;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* --- Article & Guide Page Styles --- */
.article-content {
    background-color: var(--color-background-alt);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
}
.article-content .problem-heading {
    font-size: 1.75rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #b91c1c; /* Red for problems */
    border-bottom: 2px solid #fee2e2;
    padding-bottom: 0.5rem;
}
.article-content .solution-step {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-accent);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Code Blocks & Callouts --- */
.code-block {
    background-color: var(--color-background-dark);
    color: var(--color-text-inverted);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    font-family: 'Menlo', 'Monaco', 'Consolas', "Liberation Mono", "Courier New", monospace;
    font-size: 0.875rem;
    margin: 1rem 0;
    white-space: pre;
}
.code-block .comment {
    color: #9ca3af;
}

.note, .warning {
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 0.25rem;
    border-left-width: 4px;
}
.note {
    background-color: var(--color-note-bg);
    border-left-color: var(--color-note-border);
    color: var(--color-note-text);
}
.warning {
    background-color: var(--color-warning-bg);
    border-left-color: var(--color-warning-border);
    color: var(--color-warning-text);
}

/* --- Footer --- */
.main-footer {
    background-color: #1f2937;
    color: #d1d5db;
    padding: 3rem 0;
    margin-top: 4rem;
    text-align: center;
}
.main-footer p {
    margin: 0;
}

/* --- Responsive Styles --- */
@media (min-width: 768px) {
    .guides-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .guides-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .main-nav .container {
        flex-direction: column;
    }
    .main-nav .nav-links {
        margin-top: 1rem;
    }
    .main-nav .nav-links a {
        margin: 0 0.5rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
}
