/* ============================================
   GLOBAL CSS - Dot Com Mastermind
   Reset, Variables, Typography, Header, Nav, Footer
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --color-primary: #2ea3f2;
    --color-primary-dark: #1a8fd8;
    --color-cta-start: #f2836b;
    --color-cta-end: #f7a08c;
    --color-body-text: #666666;
    --color-heading: #333333;
    --color-white: #ffffff;
    --color-light-bg: #f5f5f5;
    --color-footer-bg: #222222;
    --color-footer-bottom: #1f1f1f;
    --color-border: #dddddd;
    --color-link: #2ea3f2;
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --max-width: 1080px;
    --container-width: 80%;
    --header-height: 111px;
}

/* --- Skip to Content (Accessibility) --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px 20px;
    z-index: 10000;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* --- Utility Classes --- */
.hidden {
    display: none;
}

.bg-light {
    background-color: var(--color-light-bg);
}

/* --- 404 Page --- */
.error-content {
    text-align: center;
    padding: 60px 20px;
}

.error-content .error-cta {
    margin-top: 30px;
}

.error-content .error-browse {
    margin-top: 40px;
}

.error-content .error-links {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.error-content .error-links li {
    margin-bottom: 10px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-secondary);
    font-size: 15px;
    line-height: 1.8;
    color: var(--color-body-text);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--color-link);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-dark);
}

ul, ol {
    list-style: none;
}

button, input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 { font-size: 30px; }
h2 { font-size: 26px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
    margin-bottom: 15px;
}

strong, b {
    font-weight: 700;
}

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

/* --- Header --- */
.site-header {
    background-color: #222222;
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.header-inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo img {
    height: 86px;
    width: auto;
}

/* --- Navigation --- */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--color-white);
    font-size: 14px;
    font-weight: 600;
    padding: 10px 15px;
    display: block;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    vertical-align: middle;
    margin-top: -3px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-white);
    min-width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    color: var(--color-heading);
    padding: 10px 20px;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-menu a:hover {
    color: var(--color-primary);
    background-color: #f9f9f9;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

/* Mobile menu toggle */
.nav-overlay {
    display: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.btn-cta {
    background: linear-gradient(135deg, var(--color-cta-start), var(--color-cta-end));
    color: var(--color-white);
}

.btn-cta:hover {
    color: var(--color-white);
    box-shadow: 0 8px 25px rgba(242, 131, 107, 0.4);
}

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

.btn-primary:hover {
    color: var(--color-white);
    box-shadow: 0 8px 25px rgba(46, 163, 242, 0.4);
}

/* --- Footer --- */
.site-footer {
    background-color: var(--color-footer-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 0;
    font-size: 14px;
}

.footer-inner {
    width: var(--container-width);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-info p {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.footer-social a:hover {
    color: var(--color-white);
}

/* SVG icon in footer social links */
.footer-social a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
    padding: 15px 0;
    font-size: 13px;
    color: var(--color-body-text);
}

.breadcrumbs a {
    color: var(--color-primary);
}

.breadcrumbs span {
    margin: 0 8px;
    color: #999;
}

/* --- Section Spacing --- */
.section {
    padding: 85px 0;
}

.section-light {
    background-color: var(--color-light-bg);
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 36px;
}

/* --- Form Styles --- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--color-heading);
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background-color: var(--color-white);
    color: var(--color-heading);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Radio buttons */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 6px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-primary);
}

/* Form messages */
.form-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.form-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

/* Math Captcha */
.captcha-group {
    margin-bottom: 20px;
}

.captcha-challenge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.captcha-question {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-heading);
    white-space: nowrap;
    background: var(--color-light-bg);
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    letter-spacing: 1px;
    min-width: 160px;
    text-align: center;
}

.captcha-input {
    width: 100px;
    padding: 12px 16px;
    border: 1px solid #bbb;
    border-radius: 4px;
    background-color: var(--color-white);
    color: var(--color-heading);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.3s ease;
}

.captcha-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(46, 163, 242, 0.1);
}

.captcha-refresh {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-body-text);
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.captcha-refresh:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: rotate(180deg);
}

.captcha-refresh svg {
    width: 18px;
    height: 18px;
}

.captcha-error {
    display: none;
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
}

.captcha-error.show {
    display: block;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-white { color: var(--color-white); }
.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
