/* =========================
   Root variables & reset
   ========================= */
:root {
    --primary-color: #0066cc;
    --secondary-color: #004d99;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #f5f5f5;
    --header-bg: #fff;
    --footer-bg: #2d2d2d;
    --footer-text: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s, color 0.3s;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.promo {
    text-align:center;
}

/* =========================
   Header
   ========================= */
header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 20px;
}

/* =========================
   Logo & Banner
   ========================= */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    max-height: 80px;
    height: auto;
    width: auto;
    max-width: 100%;
}

/* Cisco logo wrapper */
.cisco-logo-wrapper svg {
    width: 200%; /* enhanced size */
    height: auto;
    display: block;
}

/* =========================
   Header Controls (Theme + Flags)
   ========================= */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

.language-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.language-selector a {
    font-size: 1.8rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: transform 0.2s, background-color 0.2s;
}

.language-selector a:hover {
    transform: scale(1.2);
    background-color: var(--card-bg);
}

.language-selector a.active {
    border: 2px solid var(--primary-color);
    background-color: var(--card-bg);
    box-shadow: 0 0 6px rgba(0,0,0,0.2);
}

/* =========================
   Hamburger
   ========================= */
.hamburger {
    display: none; /* hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
}

/* =========================
   Navigation
   ========================= */
#main-nav {
    background-color: var(--primary-color);
    display: block;
}

#main-nav .container {
    display: block;
}

#main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
}

#main-nav li {
    margin: 0;
}

#main-nav a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    transition: background-color 0.3s;
}

#main-nav a:hover {
    background-color: var(--secondary-color);
}

/* =========================
   Hero Section
   ========================= */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* =========================
   Sections (Features, News)
   ========================= */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

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

.feature-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

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

.news {
    padding: 4rem 0;
    background-color: var(--card-bg);
}

.news h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.news-item {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* =========================
   Footer
   ========================= */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 3rem 0 1rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    font-size: 1.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

/* =========================
   Responsive Design
   ========================= */
@media (max-width: 768px) {
    .hamburger {
        display: flex; /* visible only on mobile */
    }

    #main-nav ul {
        flex-direction: column;
        display: none;
    }

    #main-nav.active ul {
        display: flex;
    }

    .header-controls {
        gap: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* =========================
   Mobile Header Grid (<600px)
   ========================= */
@media (max-width: 600px) {
    /* Force header container to grid */
    header .container {
        display: grid !important;
        grid-template-columns: 1fr auto auto auto;
        grid-template-rows: auto auto;
        grid-template-areas:
            "logo theme flags hamburger"
            "cisco cisco cisco cisco";
        gap: 5px;
        justify-items: center;
        align-items: center;
        text-align: center;
    }

    /* Site logo on first row */
    .logo img:first-child {
        grid-area: logo;
        max-height: 60px;
        justify-self: start;
    }

    /* Cisco logo on second row */
    .cisco-logo-wrapper {
        grid-area: cisco;
        display: flex !important; /* override flex-wrap of logo */
        justify-content: center;
        width: 100%;
    }

    .cisco-logo-wrapper svg {
        width: 200%;
        height: auto;
    }

    /* Theme button */
    #theme-toggle {
        grid-area: theme;
        justify-self: center;
    }

    /* Language flags */
    .language-selector {
        grid-area: flags;
        display: flex !important; /* override previous flex-wrap */
        flex-direction: row;
        gap: 5px;
        justify-content: center;
    }

    /* Hamburger menu */
    .hamburger {
        grid-area: hamburger;
        justify-self: end;
        display: flex !important;
    }
}



/* =========================
   Extra Mobile Adjustments (<480px)
   ========================= */
@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cisco-logo-wrapper svg {
        width: 100px;
    }
    #promoimg {
        width: 100%;
    }
}

/* =========================
   Logo adjustments
   ========================= */
.logo img {
    max-height: 80px;
    height: auto;
    width: auto;
    display: block;
}

/* Flex adjustments for desktop header */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
/* =========================
   Desktop: center Cisco logo
   ========================= */
@media (min-width: 769px) {
    header .container {
        display: flex;
        justify-content: flex-start; /* start with site-logo on left */
        align-items: center;
        gap: 20px; /* optional spacing */
    }

    /* Site logo stays on left */
    .logo {
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }

    /* Cisco logo centered between site-logo and header-controls */
    #cisco-logo-container {
        margin-left: auto;
        margin-right: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Header controls stay on right */
    .header-controls {
        margin-left: auto; /* ensures they stay at the far right */
        display: flex;
        align-items: center;
        gap: 15px;
    }
}
