:root {
    /* UNS Institutional Colors (approx) */
    --color-uns-blue: #0b3469;
    --color-uns-gold: #dcb327;
    
    /* Oil & Gas / Premium Palette */
    --color-dark: #0f172a;
    --color-darker: #020617;
    --color-light: #f8fafc;
    --color-gray: #64748b;
    --color-accent: #f59e0b; /* Orange/Gold for energy */
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    --font-sans: 'Inter', system-ui, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-darker);
    color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(11, 52, 105, 0.4), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.15), transparent 50%);
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-light), var(--color-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-accent {
    color: var(--color-accent);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.lang-switch a {
    color: var(--color-gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.lang-switch a:hover, .lang-switch a.active {
    color: var(--color-light);
}

/* Hero Section */
.hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem 0;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-gray);
    max-width: 600px;
    margin-bottom: 2.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-darker);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--color-light);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Cards / Links Grid */
.category-section {
    margin: 4rem 0;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--color-gray);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.link-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: var(--color-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--glass-shadow);
}

.link-card h3 {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.link-card p {
    color: var(--color-gray);
    font-size: 0.9rem;
}

.rich-text-content a {
    color: var(--color-accent);
    text-decoration: underline;
    font-weight: 500;
}

.rich-text-content a:hover {
    color: var(--color-light);
}

.rich-text-content ul, .rich-text-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Forms */
.contact-section {
    padding: 2rem 0;
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-gray);
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--color-light);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

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

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
}

/* Admin Panel Specific */
.admin-layout {
    background-color: var(--color-light);
    color: var(--color-dark);
}

.admin-layout .bg-gradient {
    display: none;
}

.admin-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.admin-form .form-control {
    background: white;
    color: var(--color-dark);
    border: 1px solid #cbd5e1;
}

.admin-form .form-group label {
    color: #475569;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--color-gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

/* News Banner */
.news-banner {
    background-color: var(--color-accent);
    color: var(--color-darker);
    padding: 0.75rem 0;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Carousel */
.carousel-section {
    width: 100%;
    margin-bottom: 2rem;
}
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: var(--glass-shadow);
}
.carousel-slide {
    display: none;
    position: relative;
    width: 100%;
    height: 400px;
}
@media (max-width: 768px) {
    .carousel-slide {
        height: 250px;
    }
    .carousel-section {
        margin-bottom: 1rem;
    }
    .carousel-btn {
        padding: 10px;
        font-size: 14px;
        margin-top: -15px;
    }
}
@media (max-width: 480px) {
    .carousel-slide {
        height: 180px;
    }
    .carousel-dots {
        bottom: 8px;
    }
    .carousel-dots .dot {
        height: 8px;
        width: 8px;
        margin: 0 3px;
    }
}
.carousel-slide.active {
    display: block;
    animation: fade 1.5s;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.carousel-caption {
    position: absolute;
    bottom: 20%;
    left: 10%;
    right: 10%;
    background: rgba(11, 52, 105, 0.7);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    text-align: center;
    backdrop-filter: blur(4px);
}
.carousel-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: rgba(0,0,0,0.3);
    border: none;
}
.carousel-btn.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.carousel-btn:hover {
    background-color: rgba(0,0,0,0.8);
}
.carousel-dots {
    text-align: center;
    position: absolute;
    bottom: 15px;
    width: 100%;
}
.carousel-dots .dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}
.carousel-dots .active, .carousel-dots .dot:hover {
    background-color: white;
}
@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* Fix admin nav active state */
.admin-menu a.active {
    color: var(--color-dark);
    text-decoration: underline;
}

.badge-es {
    background-color: #fee2e2;
    color: #991b1b;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid #f87171;
}
.decorative-divider {
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-accent), transparent);
    margin: 2rem auto;
    width: 80%;
    opacity: 0.6;
}
