/* Segurança Meteorológica - Weather Safety Theme */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --sky-blue: #4A90E2;
    --storm-gray: #2C3E50;
    --cloud-white: #F8F9FA;
    --sun-yellow: #F5A623;
    --rain-blue: #5B9BD5;
    --wind-gray: #95A5A6;
    --fog-gray: #BDC3C7;
    --text-dark: #1A1A1A;
    --text-light: #FFFFFF;
    --accent-orange: #E67E22;
    --success-green: #27AE60;
    --border-light: #E0E0E0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 50%, #90CAF9 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography Randomization */
.typography-1 {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.typography-2 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0.02em;
}

.typography-3 {
    font-family: 'Arial', 'Helvetica', sans-serif;
    font-weight: 500;
    letter-spacing: 0.015em;
}

.typography-4 {
    font-family: 'Verdana', 'Geneva', sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: linear-gradient(135deg, var(--storm-gray) 0%, var(--sky-blue) 100%);
    color: var(--text-light);
    padding: 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    width: 100%;
}

.main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: 700;
    padding: 0.5rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    background: transparent;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.menu-toggle:focus {
    outline: none;
}

.menu-toggle span {
    width: 30px;
    height: 3px;
    background-color: var(--text-light);
    border-radius: 3px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s;
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    flex: 1;
    padding: 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--rain-blue) 50%, var(--storm-gray) 100%);
    color: var(--text-light);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 200"><path d="M0,100 Q300,50 600,100 T1200,100 L1200,200 L0,200 Z" fill="rgba(255,255,255,0.1)"/></svg>') repeat-x;
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.lead {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.95;
    font-weight: 300;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--rain-blue) 100%);
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

/* Sections */
.intro,
.riscos-content,
.preparacao-content,
.checklists-content,
.recursos-content,
.sobre-content,
.contactos-content,
.privacidade-content {
    padding: 3rem 0;
    background-color: var(--cloud-white);
}

.intro {
    background: linear-gradient(to bottom, var(--cloud-white) 0%, #FFFFFF 100%);
}

.intro h2,
section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--storm-gray);
    border-bottom: 3px solid var(--sky-blue);
    padding-bottom: 0.75rem;
    font-weight: 600;
}

section p {
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
    color: var(--text-dark);
    line-height: 1.8;
}

section ul,
section ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

section li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

section a {
    color: var(--sky-blue);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

section a:hover {
    border-bottom-color: var(--sky-blue);
}

/* Cards & Grid */
.quick-links {
    padding: 3rem 0;
    background: linear-gradient(to bottom, #FFFFFF 0%, var(--cloud-white) 100%);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--sky-blue) 0%, var(--rain-blue) 100%);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--sky-blue);
}

.card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--storm-gray);
    font-weight: 600;
}

.card p {
    margin-bottom: 1.5rem;
    color: #555;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--sky-blue) 0%, var(--rain-blue) 100%);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    box-shadow: 0 4px 10px rgba(74, 144, 226, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(74, 144, 226, 0.4);
    background: linear-gradient(135deg, var(--rain-blue) 0%, var(--sky-blue) 100%);
}

/* Riscos Section */
.riscos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.risco-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.risco-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.risco-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--storm-gray);
    border-bottom: 3px solid var(--sky-blue);
    padding-bottom: 0.75rem;
    font-weight: 600;
}

.risco-card h3 {
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--storm-gray);
    font-weight: 600;
}

.risco-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--border-light);
}

/* Preparação Section */
.equipamentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.equipamento-item {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.equipamento-item h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    color: var(--storm-gray);
    font-weight: 600;
    border-bottom: 2px solid var(--sky-blue);
    padding-bottom: 0.5rem;
}

.preparacao-section {
    margin-bottom: 3.5rem;
}

.preparacao-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--storm-gray);
    border-bottom: 3px solid var(--sky-blue);
    padding-bottom: 0.75rem;
    font-weight: 600;
}

/* Checklists */
.checklist-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.checklist-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.checklist-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
    color: var(--storm-gray);
    border-bottom: 3px solid var(--sky-blue);
    padding-bottom: 0.75rem;
    font-weight: 600;
}

.checklist-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 1.05rem;
    position: relative;
    padding-left: 2rem;
    list-style: none;
}

.checklist-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.75rem;
    color: var(--success-green);
    font-weight: bold;
    font-size: 1.3rem;
    line-height: 1;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-card ul {
    list-style: none;
    margin-left: 0;
}

/* Recursos */
.memorandos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.memorando-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

.memorando-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.memorando-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--storm-gray);
    font-weight: 600;
    border-bottom: 2px solid var(--sky-blue);
    padding-bottom: 0.5rem;
}

.recurso-section {
    margin-bottom: 3.5rem;
}

.recurso-section h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--storm-gray);
    border-bottom: 3px solid var(--sky-blue);
    padding-bottom: 0.75rem;
    font-weight: 600;
}

/* Contact Info */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--storm-gray);
    font-weight: 600;
    border-bottom: 2px solid var(--sky-blue);
    padding-bottom: 0.5rem;
}

.contact-card p,
.contact-card a {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.contact-card a {
    color: var(--sky-blue);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.contact-card a:hover {
    transform: translateX(5px);
    border-bottom: 1px solid var(--sky-blue);
}

/* Form */
.contact-form-section {
    margin-top: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--cloud-white) 100%);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.contact-form-section h2 {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--storm-gray);
    font-size: 1.05rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.3rem;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--sky-blue);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
    background-color: #FFFFFF;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sky-blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.form-message {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: 8px;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background-color: #D4EDDA;
    border: 2px solid var(--success-green);
    color: #155724;
    display: block;
}

.form-message.error {
    background-color: #F8D7DA;
    border: 2px solid #DC3545;
    color: #721C24;
    display: block;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--storm-gray) 0%, #1A252F 100%);
    color: var(--text-light);
    padding: 2.5rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
}

footer p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

footer a {
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s;
    border-bottom: 1px solid transparent;
}

footer a:hover {
    border-bottom-color: var(--text-light);
    opacity: 0.9;
}

/* Mobile Menu Overlay */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

body.menu-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--storm-gray) 0%, var(--sky-blue) 100%);
        flex-direction: column;
        padding: 5rem 0 2rem 0;
        gap: 0;
        max-height: 100vh;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-out;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        z-index: 1000;
        width: 80%;
        max-width: 320px;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        padding: 1rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a:hover {
        background-color: rgba(255, 255, 255, 0.15);
        transform: none;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .grid,
    .riscos-grid,
    .equipamentos-grid,
    .memorandos-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .main-nav .container {
        position: relative;
    }
}

/* High Contrast Focus States for Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid var(--sky-blue);
    outline-offset: 3px;
}

/* Weather-themed decorative elements */
.weather-icon {
    display: inline-block;
    font-size: 1.5rem;
    margin-right: 0.5rem;
}
