/* Thaumaturgis Main Styles */

:root {
    /* Color Palette - ENHANCED FOR MORE POP */
    --primary-dark: #1a252f;
    --primary-medium: #2c3e50;
    --primary-light: #34495e;
    
    /* More Vibrant Accent Colors */
    --accent-arcane: #9b59b6;
    --accent-arcane-bright: #bb6bd9;
    --accent-tech: #3498db;
    --accent-tech-bright: #5dade2;
    --accent-nature: #2ecc71;
    --accent-nature-bright: #58d68d;
    --accent-warning: #f39c12;
    --accent-danger: #e74c3c;
    
    /* Enhanced Text Colors - Light Theme */
    --text-dark: #1a252f;
    --text-medium: #2c3e50;
    --text-light: #7f8c8d;
    --text-muted: #95a5a6;
    
    /* Dark Theme Colors - For class pages and dark sections */
    --text-primary: #e2e8f0;
    --text-secondary: #a0aec0;
    --background-dark: #1a202c;
    --background-medium: #2d3748;
    --background-light-dark: #4a5568;
    --surface-color: #2d3748;
    --border-color: #4a5568;
    
    /* Backgrounds */
    --background-light: #ecf0f1;
    --background-white: #ffffff;
    --background-gradient-arcane: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --background-gradient-tech: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    --background-gradient-nature: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    
    /* Regional Colors - MORE VIBRANT */
    --uttaragiri-color: #3498db;
    --uttaragiri-bright: #5dade2;
    --prakashtat-color: #1abc9c;
    --prakashtat-bright: #48c9b0;
    --marusthali-color: #f39c12;
    --marusthali-bright: #f7dc6f;
    --haritkshetra-color: #27ae60;
    --haritkshetra-bright: #58d68d;
    --pittalpradesha-color: #9b59b6;
    --pittalpradesha-bright: #bb8fce;
    --kharak-color: #e74c3c;
    --kharak-bright: #f1948a;
    
    /* Typography */
    --font-body: 'Roboto', Arial, sans-serif;
    --font-header: 'Spectral', Georgia, serif;
    --font-mono: 'Roboto Mono', 'Courier New', monospace;
    
    /* Layout */
    --max-width: 1200px;
    --border-radius: 8px;
    --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 8px 20px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 20px rgba(155, 89, 182, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-tech-bright);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--accent-arcane-bright);
    text-decoration: underline;
}

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

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 15px; }
.col-6 { flex: 0 0 50%; max-width: 50%; padding: 0 15px; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 15px; }
.col-3 { flex: 0 0 25%; max-width: 25%; padding: 0 15px; }

@media (max-width: 768px) {
    .col-12, .col-6, .col-4, .col-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .col-md-4, .col-md-6, .col-md-8, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
}

/* Header */
.main-header {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 50%, #34495e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    border-bottom: 3px solid var(--accent-arcane-bright);
    z-index: 1000;
    position: sticky;
    top: 0;
}

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

.logo a {
    font-family: var(--font-header);
    font-size: 2rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.logo a:hover {
    color: var(--accent-arcane);
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
}

.main-nav a:hover,
.main-nav .active a {
    background-color: var(--accent-arcane);
    color: white;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-medium);
    z-index: 1001;
}

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

.dropdown-menu a {
    display: block;
    color: var(--text-dark);
    padding: 0.75rem 1rem;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background-color: var(--accent-arcane);
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-medium);
    border-top: 3px solid var(--accent-arcane);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
    border-top-color: var(--accent-arcane-bright);
}

.card h2, .card h3 {
    color: var(--primary-dark);
    border-bottom: 2px solid var(--accent-arcane-bright);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-tech) 0%, var(--accent-tech-bright) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    line-height: 1;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--accent-arcane) 0%, var(--accent-arcane-bright) 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.btn-primary { 
    background: linear-gradient(135deg, var(--accent-arcane) 0%, var(--accent-arcane-bright) 100%);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.5);
}

.btn-secondary { 
    background: linear-gradient(135deg, var(--accent-tech) 0%, var(--accent-tech-bright) 100%);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}
.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
}

.btn-success { 
    background: linear-gradient(135deg, var(--accent-nature) 0%, var(--accent-nature-bright) 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}
.btn-success:hover {
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.5);
}

.btn-warning { 
    background: linear-gradient(135deg, var(--accent-warning) 0%, var(--marusthali-bright) 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}
.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.5);
}

.btn-danger { 
    background: linear-gradient(135deg, var(--accent-danger) 0%, var(--kharak-bright) 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-tech);
    color: var(--accent-tech);
}

.btn-outline:hover {
    background-color: var(--accent-tech);
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-tech);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.1);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--primary-medium);
    color: white;
    font-weight: 500;
    position: sticky;
    top: 0;
}

tr:hover {
    background-color: rgba(52, 73, 94, 0.05);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.alert-info {
    background-color: rgba(41, 128, 185, 0.1);
    border-color: var(--accent-tech);
    color: var(--accent-tech);
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.1);
    border-color: var(--accent-warning);
    color: var(--accent-warning);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1);
    border-color: var(--accent-danger);
    color: var(--accent-danger);
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.1);
    border-color: var(--accent-nature);
    color: var(--accent-nature);
}

/* Footer */
.main-footer {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
    position: relative;
    z-index: 10;
    clear: both;
    border-top: 3px solid var(--accent-arcane-bright);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-links h3 {
    color: var(--accent-arcane-bright);
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ecf0f1;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-arcane-bright);
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--primary-medium);
    color: #95a5a6;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--text-light); }
.text-primary { color: var(--accent-tech); }
.text-success { color: var(--accent-nature); }
.text-warning { color: var(--accent-warning); }
.text-danger { color: var(--accent-danger); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

/* CTA Buttons - Enhanced Styling */
.cta-button,
.cta-primary,
.cta-secondary {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button:hover,
.cta-primary:hover,
.cta-secondary:hover {
    transform: translateY(-3px);
}

.cta-primary {
    background: linear-gradient(135deg, #9b59b6 0%, #bb6bd9 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.cta-primary:hover {
    background: linear-gradient(135deg, #bb6bd9 0%, #d896ff 100%);
    box-shadow: 0 8px 30px rgba(155, 89, 182, 0.6);
}

.cta-secondary {
    background: linear-gradient(135deg, #3498db 0%, #5dade2 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.cta-secondary:hover {
    background: linear-gradient(135deg, #5dade2 0%, #85c1e9 100%);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.6);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--text-medium);
}

.loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    color: var(--text-medium);
}

.loading-spinner i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
/* Header & nav mobile rules live in navigation.css to keep one source of truth */
@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Print Styles */
@media print {
    .main-header,
    .main-footer,
    .btn,
    .dropdown-menu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
        page-break-inside: avoid;
    }
}
