/* --- CSS STYLES --- */
:root {
    --primary: #0a192f; /* Deep Navy */
    --secondary: #c5a059; /* Industrial Gold */
    --text-light: #f8f9fa;
    --text-dark: #333;
    --accent: #172a45;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.color-secondary { color: var(--secondary); }

body {
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

/* Header & Nav */
header {
    background: var(--primary);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--secondary);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-light);
    letter-spacing: 1px;
}

.logo span { color: var(--secondary); }

.logo a, .logo a:visited  { color: #fff; text-decoration: none; }

nav ul {
    display: flex;
    list-style: none;
}

nav ul li { margin-left: 2rem; }

nav ul li a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
}

nav ul li a:hover { color: var(--secondary); }

/* Minimal flag selector styles */
.flag-selector {
    display: flex;
    gap: 8px;
    padding: 6px;
    border-radius: 10px;
}

.flag-option {
    position: relative;
}

.flag-option input {
    display: none;
}

.flag-label {
    display: block;
    width: 34px;
    height: 22px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    overflow: hidden;
}

.flag-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.flag-option input:checked + .flag-label {
    border-color: #4a6ee0;
    box-shadow: 0 0 0 3px rgba(74, 110, 224, 0.2);
}


.uk-flag {
    background: url(/uk.png) center no-repeat;
    position: relative;
}

.spain-flag {
    background: url(/sp.png) center no-repeat;
    position: relative;
}

/* Tooltip for accessibility */
.flag-label::after {
    content: attr(data-language);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.flag-label::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 4px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.flag-label:hover::after,
.flag-label:hover::before {
    opacity: 1;
}

/* Compact version (for very tight spaces) */
.flag-selector.compact {
    gap: 4px;
    padding: 4px;
}

.flag-selector.compact .flag-label {
    width: 36px;
    height: 27px;
}

/* Alternative inline version (no container background) */
.flag-selector.inline {
    background-color: transparent;
    padding: 0;
    border: none;
}

.flag-selector.inline .flag-label {
    border-radius: 4px;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('/hero.jpg') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    padding: 0 1rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    max-width: 800px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    color: #bdc3c7;
}

.btn {
    padding: 1rem 2rem;
    background: var(--secondary);
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    transition: var(--transition);
}

.btn:hover {
    background: #e2bd78;
    transform: translateY(-3px);
}

/* Services Section */
.services {
    padding: 5rem 10%;
    background: #f4f4f4;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    border-top: 4px solid var(--secondary);
}

.service-card:hover { transform: translateY(-10px); }

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}


/* Panels Section */
.section-panels {
    width: 100%;
    padding: 5rem 10%;
    text-align: center;
    color: var(--text-light);
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)), url('/oilrig.jpg') no-repeat center center/cover;
}

.section-panels h1 {
    margin-bottom: 50px;
}

panels { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(max(300px, 100% / 4), 1fr));
    gap: 2rem;
}

panel { 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2.5rem;
    border: 1px solid #537b89;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    background-color: #00000055;
    transition: var(--transition);
}

panel:hover { transform: translateY(-10px); }

panel h2 {
    margin-top: 30px;
    font-weight: normal;
}

panel img {
}

panel .icon {
    border-radius: 24px;
    background-image: url("/icons/icons.jpg");
    background-repeat: no-repeat;
    width: 128px;
    height: 128px;
}

.icon.extraction {
    background-position: -25px -35px;
    background-size: 640px;
}

.icon.storage {
    background-position: -480px -180px;
    background-size: 640px;
}

.icon.protection {
    background-position: -480px -35px;
    background-size: 640px;
}

.icon.transport {
    background-position: -330px -35px;
    background-size: 640px;
}

.icon.transform {
    background-position: -25px -335px;
    background-size: 640px;
}

.icon.trade {
    background-position: -330px -180px;
    background-size: 640px;
}

/* Contact Section */
.contact {
    padding: 5rem 10%;
    background: var(--accent);
    color: var(--text-light);
}

.contact h1 {
    margin-bottom: 20px;
    text-align: center;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.location {
    margin-top: 30px;
    border-radius: 8px;
}

form {
    display: flex;
    flex-direction: column;
}

input, textarea {
    padding: 1rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 4px;
}

/* Footer */
footer {
    background: var(--primary);
    color: #888;
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid #1d2d44;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .contact-container { grid-template-columns: 1fr; }
    nav { display: none; } /* Simplified for mobile */
}
